Roll src/third_party/skia a5783ae:7628967
[chromium-blink-merge.git] / components / dom_distiller.gypi
blob8d3165596f1ca5a344d45e7724d314ead8cbc6e3
1 # Copyright 2013 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.
6   'targets': [
7     {
8       # GN version: //components/dom_distiller/webui
9       'target_name': 'dom_distiller_webui',
10       'type': 'static_library',
11       'dependencies': [
12         '../base/base.gyp:base',
13         '../content/content.gyp:content_browser',
14         '../net/net.gyp:net',
15         '../skia/skia.gyp:skia',
16         '../sync/sync.gyp:sync',
17         '../url/url.gyp:url_lib',
18         'components_resources.gyp:components_resources',
19         'components_strings.gyp:components_strings',
20         'dom_distiller_core',
21         'dom_distiller_protos',
22       ],
23       'include_dirs': [
24         '..',
25       ],
26       'sources': [
27         'dom_distiller/webui/dom_distiller_handler.cc',
28         'dom_distiller/webui/dom_distiller_handler.h',
29         'dom_distiller/webui/dom_distiller_ui.cc',
30         'dom_distiller/webui/dom_distiller_ui.h',
31       ],
32     },
33     {
34       # GN version: //components/dom_distiller/core
35       'target_name': 'dom_distiller_core',
36       'type': 'static_library',
37       'dependencies': [
38         '../base/base.gyp:base',
39         '../base/base.gyp:base_prefs',
40         '../skia/skia.gyp:skia',
41         '../sync/sync.gyp:sync',
42         '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
43         '../third_party/re2/re2.gyp:re2',
44         'components.gyp:leveldb_proto',
45         'components_resources.gyp:components_resources',
46         'components_strings.gyp:components_strings',
47         'dom_distiller_protos',
48         'pref_registry',
49         'variations',
50       ],
51       'include_dirs': [
52         '..',
53       ],
54       'export_dependent_settings': [
55         'dom_distiller_protos',
56         '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
57       ],
58       'sources': [
59         'dom_distiller/android/component_jni_registrar.cc',
60         'dom_distiller/android/component_jni_registrar.h',
61         'dom_distiller/core/article_attachments_data.cc',
62         'dom_distiller/core/article_attachments_data.h',
63         'dom_distiller/core/article_distillation_update.cc',
64         'dom_distiller/core/article_distillation_update.h',
65         'dom_distiller/core/article_entry.cc',
66         'dom_distiller/core/article_entry.h',
67         'dom_distiller/core/distillable_page_detector.cc',
68         'dom_distiller/core/distillable_page_detector.h',
69         'dom_distiller/core/distilled_content_store.cc',
70         'dom_distiller/core/distilled_content_store.h',
71         'dom_distiller/core/distilled_page_prefs.cc',
72         'dom_distiller/core/distilled_page_prefs.h',
73         'dom_distiller/core/distilled_page_prefs_android.cc',
74         'dom_distiller/core/distilled_page_prefs_android.h',
75         'dom_distiller/core/distiller.cc',
76         'dom_distiller/core/distiller.h',
77         'dom_distiller/core/distiller_page.cc',
78         'dom_distiller/core/distiller_page.h',
79         'dom_distiller/core/distiller_url_fetcher.cc',
80         'dom_distiller/core/distiller_url_fetcher.h',
81         'dom_distiller/core/dom_distiller_constants.cc',
82         'dom_distiller/core/dom_distiller_constants.h',
83         'dom_distiller/core/dom_distiller_features.cc',
84         'dom_distiller/core/dom_distiller_features.h',
85         'dom_distiller/core/dom_distiller_model.cc',
86         'dom_distiller/core/dom_distiller_model.h',
87         'dom_distiller/core/dom_distiller_observer.h',
88         'dom_distiller/core/dom_distiller_request_view_base.cc',
89         'dom_distiller/core/dom_distiller_request_view_base.h',
90         'dom_distiller/core/dom_distiller_service.cc',
91         'dom_distiller/core/dom_distiller_service.h',
92         'dom_distiller/core/dom_distiller_service_android.cc',
93         'dom_distiller/core/dom_distiller_service_android.h',
94         'dom_distiller/core/dom_distiller_store.cc',
95         'dom_distiller/core/dom_distiller_store.h',
96         'dom_distiller/core/dom_distiller_switches.cc',
97         'dom_distiller/core/dom_distiller_switches.h',
98         'dom_distiller/core/experiments.cc',
99         'dom_distiller/core/experiments.h',
100         'dom_distiller/core/feedback_reporter.cc',
101         'dom_distiller/core/feedback_reporter.h',
102         'dom_distiller/core/font_family_list.h',
103         'dom_distiller/core/page_features.cc',
104         'dom_distiller/core/page_features.h',
105         'dom_distiller/core/task_tracker.cc',
106         'dom_distiller/core/task_tracker.h',
107         'dom_distiller/core/theme_list.h',
108         'dom_distiller/core/url_constants.cc',
109         'dom_distiller/core/url_constants.h',
110         'dom_distiller/core/url_utils.cc',
111         'dom_distiller/core/url_utils.h',
112         'dom_distiller/core/url_utils_android.cc',
113         'dom_distiller/core/url_utils_android.h',
114         'dom_distiller/core/viewer.cc',
115         'dom_distiller/core/viewer.h',
116       ],
117       'conditions': [
118         ['OS == "android"', {
119           'dependencies': [
120             'dom_distiller_core_jni_headers',
121           ],
122         }],
123       ],
124     },
125     {
126       # GN version: components/dom_distiller/core:test_support
127       'target_name': 'dom_distiller_test_support',
128       'type': 'static_library',
129       'dependencies': [
130         'dom_distiller_core',
131         'components.gyp:leveldb_proto_test_support',
132         '../sync/sync.gyp:sync',
133         '../testing/gmock.gyp:gmock',
134         '../url/url.gyp:url_lib',
135       ],
136       'include_dirs': [
137         '..',
138       ],
139       'sources': [
140         'dom_distiller/core/dom_distiller_test_util.cc',
141         'dom_distiller/core/dom_distiller_test_util.h',
142         'dom_distiller/core/fake_distiller.cc',
143         'dom_distiller/core/fake_distiller.h',
144         'dom_distiller/core/fake_distiller_page.cc',
145         'dom_distiller/core/fake_distiller_page.h',
146         'dom_distiller/core/test_request_view_handle.h',
147       ],
148     },
149     {
150       # GN version: //components/dom_distiller/core/proto
151       'target_name': 'dom_distiller_protos',
152       'type': 'static_library',
153       'sources': [
154         'dom_distiller/core/proto/adaboost.proto',
155         'dom_distiller/core/proto/distilled_article.proto',
156         'dom_distiller/core/proto/distilled_page.proto',
157       ],
158       'variables': {
159         'proto_in_dir': 'dom_distiller/core/proto',
160         'proto_out_dir': 'components/dom_distiller/core/proto',
161       },
162       'includes': [ '../build/protoc.gypi' ]
163     },
164     {
165       # GN version: //components/dom_distiller/content:mojo_bindings
166       'target_name': 'dom_distiller_mojo_bindings',
167       'type': 'static_library',
168       'sources': [
169         'dom_distiller/content/common/distiller_javascript_service.mojom',
170         'dom_distiller/content/common/distiller_page_notifier_service.mojom',
171       ],
172       'includes': [
173         '../third_party/mojo/mojom_bindings_generator.gypi',
174       ],
175     },
176   ],
177   'conditions': [
178     ['OS != "ios"', {
179       'targets': [
180         {
181           # GN version: //components/dom_distiller/content:content_browser
182           'target_name': 'dom_distiller_content_browser',
183           'type': 'static_library',
184           'dependencies': [
185             'dom_distiller_core',
186             'dom_distiller_mojo_bindings',
187             'dom_distiller_protos',
188             '../base/base.gyp:base',
189             '../content/content.gyp:content_browser',
190             '../mojo/mojo_base.gyp:mojo_environment_chromium',
191             '../net/net.gyp:net',
192             '../skia/skia.gyp:skia',
193             '../sync/sync.gyp:sync',
194             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
195             '../ui/gfx/gfx.gyp:gfx',
196             '../url/url.gyp:url_lib',
197             'components_resources.gyp:components_resources',
198             'components_strings.gyp:components_strings',
199           ],
200           'include_dirs': [
201             '..',
202           ],
203           'sources': [
204             'dom_distiller/content/browser/distillable_page_utils.cc',
205             'dom_distiller/content/browser/distillable_page_utils.h',
206             'dom_distiller/content/browser/distillable_page_utils_android.cc',
207             'dom_distiller/content/browser/distillable_page_utils_android.h',
208             'dom_distiller/content/browser/distiller_javascript_service_impl.cc',
209             'dom_distiller/content/browser/distiller_javascript_service_impl.h',
210             'dom_distiller/content/browser/distiller_javascript_utils.cc',
211             'dom_distiller/content/browser/distiller_javascript_utils.h',
212             'dom_distiller/content/browser/distiller_page_web_contents.cc',
213             'dom_distiller/content/browser/distiller_page_web_contents.h',
214             'dom_distiller/content/browser/dom_distiller_viewer_source.cc',
215             'dom_distiller/content/browser/dom_distiller_viewer_source.h',
216             'dom_distiller/content/browser/external_feedback_reporter.h',
217             'dom_distiller/content/browser/web_contents_main_frame_observer.cc',
218             'dom_distiller/content/browser/web_contents_main_frame_observer.h',
219           ],
220           'conditions': [
221             ['OS == "android"', {
222               'dependencies': [
223                 'dom_distiller_content_jni_headers',
224                 'dom_distiller_core_jni_headers',
225               ],
226             }],
227           ],
228         },
229         {
230           # GN version: //components/dom_distiller/content:content_renderer
231           'target_name': 'dom_distiller_content_renderer',
232           'type': 'static_library',
233           'dependencies': [
234             'dom_distiller_mojo_bindings',
235             '../base/base.gyp:base',
236             '../content/content.gyp:content_browser',
237             '../gin/gin.gyp:gin',
238             '../mojo/mojo_base.gyp:mojo_environment_chromium',
239             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
240           ],
241           'include_dirs': [
242             '..',
243           ],
244           'sources': [
245             'dom_distiller/content/renderer/distiller_js_render_frame_observer.cc',
246             'dom_distiller/content/renderer/distiller_js_render_frame_observer.h',
247             'dom_distiller/content/renderer/distiller_native_javascript.cc',
248             'dom_distiller/content/renderer/distiller_native_javascript.h',
249             'dom_distiller/content/renderer/distiller_page_notifier_service_impl.cc',
250             'dom_distiller/content/renderer/distiller_page_notifier_service_impl.h',
251           ],
252         },
254       ],
255     }],
256     ['OS=="ios"', {
257       'targets': [
258         {
259           'target_name': 'dom_distiller_ios',
260           'type': 'static_library',
261           'dependencies': [
262             '../ios/provider/ios_provider_web.gyp:ios_provider_web',
263             'dom_distiller_protos',
264             'dom_distiller_core',
265           ],
266           'include_dirs': [
267             '..',
268           ],
269           'sources': [
270             'dom_distiller/ios/distiller_page_factory_ios.h',
271             'dom_distiller/ios/distiller_page_factory_ios.mm',
272             'dom_distiller/ios/distiller_page_ios.h',
273             'dom_distiller/ios/distiller_page_ios.mm',
274           ],
275         },
276       ],
277     }],
278     ['OS=="android"', {
279       'targets': [
280         {
281           # TODO(cjhopman): remove this when it is rolled downstream.
282           'target_name': 'dom_distiller_core_java',
283           'type': 'none',
284           'dependencies': [
285             'dom_distiller_java',
286           ],
287         },
288         {
289           # GN: //components/dom_distiller/android:dom_distiller_java
290           'target_name': 'dom_distiller_java',
291           'type': 'none',
292           'dependencies': [
293             'dom_distiller_core_font_family_java',
294             'dom_distiller_core_theme_java',
295             '../base/base.gyp:base',
296             '../content/content.gyp:content_java',
297           ],
298           'variables': {
299             'java_in_dir': 'dom_distiller/android/java',
300           },
301           'includes': [ '../build/java.gypi' ],
302         },
303         {
304           # GN: //components/dom_distiller/android:dom_distiller_core_font_family_javagen
305           'target_name': 'dom_distiller_core_font_family_java',
306           'type': 'none',
307           'sources': [
308             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/FontFamily.template',
309           ],
310           'variables': {
311             'package_name': 'org/chromium/components/dom_distiller/core',
312             'template_deps': ['dom_distiller/core/font_family_list.h'],
313           },
314           'includes': [ '../build/android/java_cpp_template.gypi' ],
315         },
316         {
317           # GN: //components/dom_distiller/content:jni_headers
318           'target_name': 'dom_distiller_content_jni_headers',
319           'type': 'none',
320           'sources': [
321             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java',
322           ],
323           'variables': {
324             'jni_gen_package': 'dom_distiller_content',
325           },
326           'includes': [ '../build/jni_generator.gypi' ],
327         },
328         {
329           # GN: //components/dom_distiller/core:jni_headers
330           'target_name': 'dom_distiller_core_jni_headers',
331           'type': 'none',
332           'sources': [
333             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java',
334             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java',
335             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java',
336           ],
337           'variables': {
338             'jni_gen_package': 'dom_distiller_core',
339           },
340           'includes': [ '../build/jni_generator.gypi' ],
341         },
342         {
343           # GN: //components/dom_distiller/android:dom_distiller_core_theme_javagen
344           'target_name': 'dom_distiller_core_theme_java',
345           'type': 'none',
346           'sources': [
347             'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/Theme.template',
348           ],
349           'variables': {
350             'package_name': 'org/chromium/components/dom_distiller/core',
351             'template_deps': ['dom_distiller/core/theme_list.h'],
352           },
353           'includes': [ '../build/android/java_cpp_template.gypi' ],
354         },
355       ],
356     }],
357   ],