Move gn build file for sfntly from secondary tree into the main tree.
[chromium-blink-merge.git] / components / dom_distiller / core / BUILD.gn
bloba9b1cda351b68049cd9348b36e578cc0c01afd48
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_service.cc",
36     "dom_distiller_service.h",
37     "dom_distiller_store.cc",
38     "dom_distiller_store.h",
39     "dom_distiller_switches.cc",
40     "dom_distiller_switches.h",
41     "experiments.cc",
42     "experiments.h",
43     "external_feedback_reporter.h",
44     "feedback_reporter.cc",
45     "feedback_reporter.h",
46     "page_features.cc",
47     "page_features.h",
48     "task_tracker.cc",
49     "task_tracker.h",
50     "url_constants.cc",
51     "url_constants.h",
52     "url_utils.cc",
53     "url_utils.h",
54     "url_utils_android.cc",
55     "url_utils_android.h",
56     "viewer.cc",
57     "viewer.h",
58   ]
60   public_deps = [
61     "//components/dom_distiller/core/proto",
62     "//third_party/dom_distiller_js:proto",
63   ]
64   deps = [
65     "//base",
66     "//base:prefs",
67     "//components/leveldb_proto",
68     "//components/pref_registry",
69     "//components/resources",
70     "//components/strings",
71     "//net",
72     "//skia",
73     "//sync",
74     "//sync/protocol",  # TODO(brettw) bug 475091: this should be unnecessary.
75     "//third_party/re2",
76     "//ui/base",
77     "//url",
78   ]
80   if (is_android) {
81     sources += [
82       "dom_distiller_service_android.cc",
83       "dom_distiller_service_android.h",
84     ]
85     deps += [ ":jni_headers" ]
86   }
89 # GYP version: components/dom_distiller.gypi:dom_distiller_test_support
90 source_set("test_support") {
91   testonly = true
92   sources = [
93     "dom_distiller_test_util.cc",
94     "dom_distiller_test_util.h",
95     "fake_distiller.cc",
96     "fake_distiller.h",
97     "fake_distiller_page.cc",
98     "fake_distiller_page.h",
99   ]
101   deps = [
102     ":core",
103     "//base",
104     "//components/leveldb_proto:test_support",
105     "//sync",
106     "//testing/gmock",
107     "//testing/gtest",
108     "//url",
109   ]
112 source_set("unit_tests") {
113   testonly = true
114   sources = [
115     "article_entry_unittest.cc",
116     "distilled_content_store_unittest.cc",
117     "distilled_page_prefs_unittests.cc",
118     "distiller_unittest.cc",
119     "distiller_url_fetcher_unittest.cc",
120     "dom_distiller_model_unittest.cc",
121     "dom_distiller_service_unittest.cc",
122     "dom_distiller_store_unittest.cc",
123     "page_features_unittest.cc",
124     "task_tracker_unittest.cc",
125     "url_utils_unittest.cc",
126     "viewer_unittest.cc",
127   ]
129   deps = [
130     ":core",
131     ":test_support",
132     "//base",
133     "//components/leveldb_proto:test_support",
134     "//components/pref_registry:test_support",
135     "//net:test_support",
136     "//sync",
137     "//testing/gmock",
138     "//testing/gtest",
139     "//url",
140   ]
143 if (is_android) {
144   import("//build/config/android/rules.gni")
146   generate_jni("jni_headers") {
147     sources = [
148       "../android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
149       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
150       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
151     ]
152     jni_package = "dom_distiller_core"
153   }