Don't preload rarely seen large images
[chromium-blink-merge.git] / components / dom_distiller / core / BUILD.gn
bloba14ad2130cbca24dff762b70d22211d28233f1e1
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # GYP version: components/dom_distiller.gypi:dom_distiller_core
6 source_set("core") {
7   sources = [
8     "../android/component_jni_registrar.cc",
9     "../android/component_jni_registrar.h",
10     "article_attachments_data.cc",
11     "article_attachments_data.h",
12     "article_distillation_update.cc",
13     "article_distillation_update.h",
14     "article_entry.cc",
15     "article_entry.h",
16     "distillable_page_detector.cc",
17     "distillable_page_detector.h",
18     "distilled_content_store.cc",
19     "distilled_content_store.h",
20     "distilled_page_prefs.cc",
21     "distilled_page_prefs.h",
22     "distilled_page_prefs_android.cc",
23     "distilled_page_prefs_android.h",
24     "distiller.cc",
25     "distiller.h",
26     "distiller_page.cc",
27     "distiller_page.h",
28     "distiller_url_fetcher.cc",
29     "distiller_url_fetcher.h",
30     "dom_distiller_constants.cc",
31     "dom_distiller_constants.h",
32     "dom_distiller_model.cc",
33     "dom_distiller_model.h",
34     "dom_distiller_observer.h",
35     "dom_distiller_request_view_base.cc",
36     "dom_distiller_request_view_base.h",
37     "dom_distiller_service.cc",
38     "dom_distiller_service.h",
39     "dom_distiller_store.cc",
40     "dom_distiller_store.h",
41     "dom_distiller_switches.cc",
42     "dom_distiller_switches.h",
43     "experiments.cc",
44     "experiments.h",
45     "external_feedback_reporter.h",
46     "feedback_reporter.cc",
47     "feedback_reporter.h",
48     "page_features.cc",
49     "page_features.h",
50     "task_tracker.cc",
51     "task_tracker.h",
52     "url_constants.cc",
53     "url_constants.h",
54     "url_utils.cc",
55     "url_utils.h",
56     "url_utils_android.cc",
57     "url_utils_android.h",
58     "viewer.cc",
59     "viewer.h",
60   ]
62   public_deps = [
63     "//components/dom_distiller/core/proto",
64     "//third_party/dom_distiller_js:proto",
65   ]
66   deps = [
67     "//base",
68     "//base:prefs",
69     "//components/leveldb_proto",
70     "//components/pref_registry",
71     "//components/resources",
72     "//components/strings",
73     "//net",
74     "//skia",
75     "//sync",
76     "//sync/protocol",  # TODO(brettw) bug 475091: this should be unnecessary.
77     "//third_party/re2",
78     "//ui/base",
79     "//url",
80   ]
82   if (is_android) {
83     sources += [
84       "dom_distiller_service_android.cc",
85       "dom_distiller_service_android.h",
86     ]
87     deps += [ ":jni_headers" ]
88   }
91 # GYP version: components/dom_distiller.gypi:dom_distiller_test_support
92 source_set("test_support") {
93   testonly = true
94   sources = [
95     "dom_distiller_test_util.cc",
96     "dom_distiller_test_util.h",
97     "fake_distiller.cc",
98     "fake_distiller.h",
99     "fake_distiller_page.cc",
100     "fake_distiller_page.h",
101     "test_request_view_handle.h",
102   ]
104   deps = [
105     ":core",
106     "//base",
107     "//components/leveldb_proto:test_support",
108     "//sync",
109     "//testing/gmock",
110     "//testing/gtest",
111     "//url",
112   ]
115 source_set("unit_tests") {
116   testonly = true
117   sources = [
118     "article_entry_unittest.cc",
119     "distilled_content_store_unittest.cc",
120     "distilled_page_prefs_unittests.cc",
121     "distiller_unittest.cc",
122     "distiller_url_fetcher_unittest.cc",
123     "dom_distiller_model_unittest.cc",
124     "dom_distiller_request_view_base_unittest.cc",
125     "dom_distiller_service_unittest.cc",
126     "dom_distiller_store_unittest.cc",
127     "page_features_unittest.cc",
128     "task_tracker_unittest.cc",
129     "url_utils_unittest.cc",
130     "viewer_unittest.cc",
131   ]
133   deps = [
134     ":core",
135     ":test_support",
136     "//base",
137     "//components/leveldb_proto:test_support",
138     "//components/pref_registry:test_support",
139     "//components/resources",
140     "//components/strings",
141     "//net:test_support",
142     "//sync",
143     "//testing/gmock",
144     "//testing/gtest",
145     "//url",
146   ]
149 if (is_android) {
150   import("//build/config/android/rules.gni")
152   generate_jni("jni_headers") {
153     sources = [
154       "../android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
155       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
156       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
157     ]
158     jni_package = "dom_distiller_core"
159   }