Add abhijeet.k@samsung.com to AUTHORS list.
[chromium-blink-merge.git] / components / dom_distiller / core / BUILD.gn
blobcbc4c56cf453666b6146a7899279fc3e52f22d7e
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     "feedback_reporter.cc",
44     "feedback_reporter.h",
45     "page_features.cc",
46     "page_features.h",
47     "task_tracker.cc",
48     "task_tracker.h",
49     "url_constants.cc",
50     "url_constants.h",
51     "url_utils.cc",
52     "url_utils.h",
53     "url_utils_android.cc",
54     "url_utils_android.h",
55     "viewer.cc",
56     "viewer.h",
57   ]
59   public_deps = [
60     "//components/dom_distiller/core/proto",
61     "//third_party/dom_distiller_js:proto",
62   ]
63   deps = [
64     "//base",
65     "//base:prefs",
66     "//components/leveldb_proto",
67     "//components/pref_registry",
68     "//components/resources",
69     "//components/strings",
70     "//net",
71     "//skia",
72     "//sync",
73     "//third_party/re2",
74     "//ui/base",
75     "//url",
76   ]
78   if (is_android) {
79     sources += [
80       "dom_distiller_service_android.cc",
81       "dom_distiller_service_android.h",
82     ]
83     deps += [ ":jni_headers" ]
84   }
87 # GYP version: components/dom_distiller.gypi:dom_distiller_test_support
88 source_set("test_support") {
89   testonly = true
90   sources = [
91     "dom_distiller_test_util.cc",
92     "dom_distiller_test_util.h",
93     "fake_distiller.cc",
94     "fake_distiller.h",
95     "fake_distiller_page.cc",
96     "fake_distiller_page.h",
97   ]
99   deps = [
100     ":core",
101     "//base",
102     "//components/leveldb_proto:test_support",
103     "//sync",
104     "//testing/gmock",
105     "//testing/gtest",
106     "//url",
107   ]
110 source_set("unit_tests") {
111   testonly = true
112   sources = [
113     "article_entry_unittest.cc",
114     "distilled_content_store_unittest.cc",
115     "distilled_page_prefs_unittests.cc",
116     "distiller_unittest.cc",
117     "distiller_url_fetcher_unittest.cc",
118     "dom_distiller_model_unittest.cc",
119     "dom_distiller_service_unittest.cc",
120     "dom_distiller_store_unittest.cc",
121     "page_features_unittest.cc",
122     "task_tracker_unittest.cc",
123     "url_utils_unittest.cc",
124     "viewer_unittest.cc",
125   ]
127   deps = [
128     ":core",
129     ":test_support",
130     "//base",
131     "//components/leveldb_proto:test_support",
132     "//components/pref_registry:test_support",
133     "//net:test_support",
134     "//sync",
135     "//testing/gmock",
136     "//testing/gtest",
137     "//url",
138   ]
141 if (is_android) {
142   import("//build/config/android/rules.gni")
144   generate_jni("jni_headers") {
145     sources = [
146       "../android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
147       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
148       "../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
149     ]
150     jni_package = "dom_distiller_core"
151   }