1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
# Copyright 2014 The Chromium Authors
# 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",
"distiller.cc",
"distiller.h",
"distiller_page.cc",
"distiller_page.h",
"distiller_ui_handle.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_request_view_base.cc",
"dom_distiller_request_view_base.h",
"dom_distiller_service.cc",
"dom_distiller_service.h",
"dom_distiller_switches.cc",
"dom_distiller_switches.h",
"experiments.cc",
"experiments.h",
"extraction_utils.cc",
"extraction_utils.h",
"page_features.cc",
"page_features.h",
"pref_names.h",
"task_tracker.cc",
"task_tracker.h",
"url_constants.h",
"url_utils.cc",
"url_utils.h",
"viewer.cc",
"viewer.h",
]
public_deps = [
"//components/dom_distiller/core/proto",
"//net",
"//third_party/dom_distiller_js:proto",
]
deps = [
"//base",
"//build:blink_buildflags",
"//components/dom_distiller/core/mojom",
"//components/leveldb_proto",
"//components/pref_registry",
"//components/prefs",
"//components/resources",
"//components/strings",
"//components/variations",
"//services/network/public/cpp:cpp",
"//skia",
"//third_party/re2",
"//ui/base",
"//url",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
if (is_android) {
sources += [
"distilled_page_prefs_android.cc",
"distilled_page_prefs_android.h",
"dom_distiller_service_android.cc",
"dom_distiller_service_android.h",
"url_utils_android.cc",
]
deps += [ "//components/dom_distiller/core/android:jni_headers" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"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",
"//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_request_view_base_unittest.cc",
"dom_distiller_service_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_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")
java_cpp_enum("distiller_type_java") {
sources = [ "experiments.h" ]
}
}
|