mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
183 lines
4.6 KiB
Plaintext
183 lines
4.6 KiB
Plaintext
|
# Copyright 2014 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.
|
||
|
|
||
|
static_library("core") {
|
||
|
sources = [
|
||
|
"article_distillation_update.cc",
|
||
|
"article_distillation_update.h",
|
||
|
"article_entry.cc",
|
||
|
"article_entry.h",
|
||
|
"distillable_page_detector.cc",
|
||
|
"distillable_page_detector.h",
|
||
|
"distilled_content_store.cc",
|
||
|
"distilled_content_store.h",
|
||
|
"distilled_page_prefs.cc",
|
||
|
"distilled_page_prefs.h",
|
||
|
"distilled_page_prefs_android.cc",
|
||
|
"distilled_page_prefs_android.h",
|
||
|
"distiller.cc",
|
||
|
"distiller.h",
|
||
|
"distiller_page.cc",
|
||
|
"distiller_page.h",
|
||
|
"distiller_url_fetcher.cc",
|
||
|
"distiller_url_fetcher.h",
|
||
|
"dom_distiller_constants.cc",
|
||
|
"dom_distiller_constants.h",
|
||
|
"dom_distiller_features.cc",
|
||
|
"dom_distiller_features.h",
|
||
|
"dom_distiller_model.cc",
|
||
|
"dom_distiller_model.h",
|
||
|
"dom_distiller_observer.h",
|
||
|
"dom_distiller_request_view_base.cc",
|
||
|
"dom_distiller_request_view_base.h",
|
||
|
"dom_distiller_service.cc",
|
||
|
"dom_distiller_service.h",
|
||
|
"dom_distiller_store.cc",
|
||
|
"dom_distiller_store.h",
|
||
|
"dom_distiller_switches.cc",
|
||
|
"dom_distiller_switches.h",
|
||
|
"experiments.cc",
|
||
|
"experiments.h",
|
||
|
"feedback_reporter.cc",
|
||
|
"feedback_reporter.h",
|
||
|
"page_features.cc",
|
||
|
"page_features.h",
|
||
|
"pref_names.cc",
|
||
|
"pref_names.h",
|
||
|
"task_tracker.cc",
|
||
|
"task_tracker.h",
|
||
|
"url_constants.cc",
|
||
|
"url_constants.h",
|
||
|
"url_utils.cc",
|
||
|
"url_utils.h",
|
||
|
"url_utils_android.cc",
|
||
|
"viewer.cc",
|
||
|
"viewer.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//components/dom_distiller/core/proto",
|
||
|
"//net",
|
||
|
"//third_party/dom_distiller_js:proto",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//components/data_use_measurement/core",
|
||
|
"//components/leveldb_proto",
|
||
|
"//components/pref_registry",
|
||
|
"//components/prefs",
|
||
|
"//components/resources",
|
||
|
"//components/strings",
|
||
|
"//components/sync",
|
||
|
"//components/variations",
|
||
|
"//services/network/public/cpp:cpp",
|
||
|
"//skia",
|
||
|
"//third_party/re2",
|
||
|
"//ui/base",
|
||
|
"//url",
|
||
|
]
|
||
|
|
||
|
if (is_android) {
|
||
|
sources += [
|
||
|
"dom_distiller_service_android.cc",
|
||
|
"dom_distiller_service_android.h",
|
||
|
]
|
||
|
deps += [ ":jni_headers" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static_library("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"dom_distiller_test_util.cc",
|
||
|
"dom_distiller_test_util.h",
|
||
|
"fake_distiller.cc",
|
||
|
"fake_distiller.h",
|
||
|
"fake_distiller_page.cc",
|
||
|
"fake_distiller_page.h",
|
||
|
"test_request_view_handle.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":core",
|
||
|
"//base",
|
||
|
"//components/leveldb_proto:test_support",
|
||
|
"//components/sync",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
"//url",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
bundle_data("unit_tests_bundle_data") {
|
||
|
visibility = [ ":unit_tests" ]
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"//components/test/data/dom_distiller/core_features.json",
|
||
|
"//components/test/data/dom_distiller/derived_features.json",
|
||
|
]
|
||
|
outputs = [
|
||
|
"{{bundle_resources_dir}}/" +
|
||
|
"{{source_root_relative_dir}}/{{source_file_part}}",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
source_set("unit_tests") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"article_entry_unittest.cc",
|
||
|
"distillable_page_detector_unittest.cc",
|
||
|
"distilled_content_store_unittest.cc",
|
||
|
"distilled_page_prefs_unittests.cc",
|
||
|
"distiller_unittest.cc",
|
||
|
"distiller_url_fetcher_unittest.cc",
|
||
|
"dom_distiller_model_unittest.cc",
|
||
|
"dom_distiller_request_view_base_unittest.cc",
|
||
|
"dom_distiller_service_unittest.cc",
|
||
|
"dom_distiller_store_unittest.cc",
|
||
|
"page_features_unittest.cc",
|
||
|
"task_tracker_unittest.cc",
|
||
|
"url_utils_unittest.cc",
|
||
|
"viewer_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":core",
|
||
|
":test_support",
|
||
|
":unit_tests_bundle_data",
|
||
|
"//base",
|
||
|
"//components/leveldb_proto:test_support",
|
||
|
"//components/resources",
|
||
|
"//components/strings",
|
||
|
"//components/sync",
|
||
|
"//components/sync_preferences:test_support",
|
||
|
"//net:test_support",
|
||
|
"//services/network:test_support",
|
||
|
"//services/network/public/cpp:cpp",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
"//ui/base",
|
||
|
"//url",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_android) {
|
||
|
import("//build/config/android/rules.gni")
|
||
|
|
||
|
generate_jni("jni_headers") {
|
||
|
sources = [
|
||
|
"android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
|
||
|
"android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
|
||
|
"android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
|
||
|
]
|
||
|
jni_package = "dom_distiller_core"
|
||
|
}
|
||
|
|
||
|
java_cpp_enum("distiller_type_java") {
|
||
|
sources = [
|
||
|
"experiments.h",
|
||
|
]
|
||
|
}
|
||
|
}
|