blob: b2ef4a55c3dc8f18dd27f7073268705c79f6019e [file] [log] [blame]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
static_library("core") {
sources = [
"offline_content_aggregator.cc",
"offline_content_aggregator.h",
"offline_content_provider.h",
"offline_item.cc",
"offline_item.h",
"offline_item_filter.h",
"offline_item_state.h",
"throttled_offline_content_provider.cc",
"throttled_offline_content_provider.h",
]
public_deps = [
"//base",
"//components/keyed_service/core",
"//ui/gfx",
"//url",
]
deps = [
"//ui/gfx/geometry",
]
if (is_android) {
sources += [
"android/offline_content_aggregator_bridge.cc",
"android/offline_content_aggregator_bridge.h",
"android/offline_item_bridge.cc",
"android/offline_item_bridge.h",
"android/offline_item_visuals_bridge.cc",
"android/offline_item_visuals_bridge.h",
]
deps += [ ":jni_headers" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"offline_content_aggregator_unittest.cc",
"throttled_offline_content_provider_unittest.cc",
]
deps = [
":core",
"//base/test:test_support",
"//components/offline_items_collection/core/test_support",
]
}
if (is_android) {
android_library("core_java") {
java_files = [
"android/java/src/org/chromium/components/offline_items_collection/bridges/OfflineItemBridge.java",
"android/java/src/org/chromium/components/offline_items_collection/bridges/OfflineItemVisualsBridge.java",
"android/java/src/org/chromium/components/offline_items_collection/ContentId.java",
"android/java/src/org/chromium/components/offline_items_collection/LegacyHelpers.java",
"android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java",
"android/java/src/org/chromium/components/offline_items_collection/OfflineContentProvider.java",
"android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java",
"android/java/src/org/chromium/components/offline_items_collection/OfflineItemVisuals.java",
"android/java/src/org/chromium/components/offline_items_collection/VisualsCallback.java",
]
srcjar_deps = [ ":jni_enums" ]
deps = [
"//base:base_java",
"//third_party/android_tools:android_support_annotations_java",
]
}
generate_jni("jni_headers") {
visibility = [ ":*" ]
sources = [
"android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java",
"android/java/src/org/chromium/components/offline_items_collection/bridges/OfflineItemBridge.java",
"android/java/src/org/chromium/components/offline_items_collection/bridges/OfflineItemVisualsBridge.java",
]
jni_package = "components/offline_items_collection/core/android"
}
java_cpp_enum("jni_enums") {
visibility = [ ":*" ]
sources = [
"offline_item.h",
"offline_item_filter.h",
"offline_item_state.h",
]
}
}