Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / components / dom_distiller / core / BUILD.gn
blobf07e024f49eaa27af73f35d51b95cf24349bb1b1
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_features.cc",
33     "dom_distiller_features.h",
34     "dom_distiller_model.cc",
35     "dom_distiller_model.h",
36     "dom_distiller_observer.h",
37     "dom_distiller_request_view_base.cc",
38     "dom_distiller_request_view_base.h",
39     "dom_distiller_service.cc",
40     "dom_distiller_service.h",
41     "dom_distiller_store.cc",
42     "dom_distiller_store.h",
43     "dom_distiller_switches.cc",
44     "dom_distiller_switches.h",
45     "experiments.cc",
46     "experiments.h",
47     "feedback_reporter.cc",
48     "feedback_reporter.h",
49     "page_features.cc",
50     "page_features.h",
51     "task_tracker.cc",
52     "task_tracker.h",
53     "url_constants.cc",
54     "url_constants.h",
55     "url_utils.cc",
56     "url_utils.h",
57     "url_utils_android.cc",
58     "url_utils_android.h",
59     "viewer.cc",
60     "viewer.h",
61   ]
63   public_deps = [
64     "//components/dom_distiller/core/proto",
65     "//third_party/dom_distiller_js:proto",
66   ]
67   deps = [
68     "//base",
69     "//base:prefs",
70     "//components/leveldb_proto",
71     "//components/pref_registry",
72     "//components/resources",
73     "//components/strings",
74     "//components/variations",
75     "//net",
76     "//skia",
77     "//sync",
78     "//sync/protocol",  # TODO(brettw) bug 475091: this should be unnecessary.
79     "//third_party/re2",
80     "//ui/base",
81     "//url",
82   ]
84   if (is_android) {
85     sources += [
86       "dom_distiller_service_android.cc",
87       "dom_distiller_service_android.h",
88     ]
89     deps += [ ":jni_headers" ]
90   }
93 # GYP version: components/dom_distiller.gypi:dom_distiller_test_support
94 source_set("test_support") {
95   testonly = true
96   sources = [
97     "dom_distiller_test_util.cc",
98     "dom_distiller_test_util.h",
99     "fake_distiller.cc",
100     "fake_distiller.h",
101     "fake_distiller_page.cc",
102     "fake_distiller_page.h",
103     "test_request_view_handle.h",
104   ]
106   deps = [
107     ":core",
108     "//base",
109     "//components/leveldb_proto:test_support",
110     "//sync",
111     "//testing/gmock",
112     "//testing/gtest",
113     "//url",
114   ]
117 source_set("unit_tests") {
118   testonly = true
119   sources = [
120     "article_entry_unittest.cc",
121     "distillable_page_detector_unittest.cc",
122     "distilled_content_store_unittest.cc",
123     "distilled_page_prefs_unittests.cc",
124     "distiller_unittest.cc",
125     "distiller_url_fetcher_unittest.cc",
126     "dom_distiller_model_unittest.cc",
127     "dom_distiller_request_view_base_unittest.cc",
128     "dom_distiller_service_unittest.cc",
129     "dom_distiller_store_unittest.cc",
130     "page_features_unittest.cc",
131     "task_tracker_unittest.cc",
132     "url_utils_unittest.cc",
133     "viewer_unittest.cc",
134   ]
136   deps = [
137     ":core",
138     ":test_support",
139     "//base",
140     "//components/leveldb_proto:test_support",
141     "//components/pref_registry:test_support",
142     "//components/resources",
143     "//components/strings",
144     "//net:test_support",
145     "//sync",
146     "//testing/gmock",
147     "//testing/gtest",
148     "//url",
149   ]
152 if (is_android) {
153   import("//build/config/android/rules.gni")
155   generate_jni("jni_headers") {
156     sources = [
157       "../android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
158       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
159       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
160     ]
161     jni_package = "dom_distiller_core"
162   }