Reland r286968: The CL borrows ShareDialog from Files.app and add it to Gallery.
[chromium-blink-merge.git] / components / dom_distiller.gypi
blobb18bee70983663e9e09c96ab08a89c26e82d868f
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   'conditions': [
7     ['android_webview_build == 0', {
8       'targets': [
9         {
10           # GN version: //components/dom_distiller/webui
11           'target_name': 'dom_distiller_webui',
12           'type': 'static_library',
13           'dependencies': [
14             '../base/base.gyp:base',
15             '../content/content.gyp:content_browser',
16             '../skia/skia.gyp:skia',
17             '../sync/sync.gyp:sync',
18             'components_resources.gyp:components_resources',
19             'components_strings.gyp:components_strings',
20             'distilled_page_proto',
21             'dom_distiller_core',
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             '../skia/skia.gyp:skia',
40             '../sync/sync.gyp:sync',
41             '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
42             'components.gyp:leveldb_proto',
43             'components_resources.gyp:components_resources',
44             'components_strings.gyp:components_strings',
45             'distilled_page_proto',
46           ],
47           'include_dirs': [
48             '..',
49           ],
50           'export_dependent_settings': [
51             'distilled_page_proto',
52             '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
53           ],
54           'sources': [
55             'dom_distiller/android/component_jni_registrar.cc',
56             'dom_distiller/android/component_jni_registrar.h',
57             'dom_distiller/core/article_distillation_update.cc',
58             'dom_distiller/core/article_distillation_update.h',
59             'dom_distiller/core/article_entry.cc',
60             'dom_distiller/core/article_entry.h',
61             'dom_distiller/core/distilled_content_store.cc',
62             'dom_distiller/core/distilled_content_store.h',
63             'dom_distiller/core/distilled_page_prefs.cc',
64             'dom_distiller/core/distilled_page_prefs.h',
65             'dom_distiller/core/distilled_page_prefs_android.cc',
66             'dom_distiller/core/distilled_page_prefs_android.h',
67             'dom_distiller/core/distiller.cc',
68             'dom_distiller/core/distiller.h',
69             'dom_distiller/core/distiller_page.cc',
70             'dom_distiller/core/distiller_page.h',
71             'dom_distiller/core/distiller_url_fetcher.cc',
72             'dom_distiller/core/distiller_url_fetcher.h',
73             'dom_distiller/core/dom_distiller_constants.cc',
74             'dom_distiller/core/dom_distiller_constants.h',
75             'dom_distiller/core/dom_distiller_model.cc',
76             'dom_distiller/core/dom_distiller_model.h',
77             'dom_distiller/core/dom_distiller_observer.h',
78             'dom_distiller/core/dom_distiller_service.cc',
79             'dom_distiller/core/dom_distiller_service.h',
80             'dom_distiller/core/dom_distiller_service_android.cc',
81             'dom_distiller/core/dom_distiller_service_android.h',
82             'dom_distiller/core/dom_distiller_store.cc',
83             'dom_distiller/core/dom_distiller_store.h',
84             'dom_distiller/core/feedback_reporter.cc',
85             'dom_distiller/core/feedback_reporter.h',
86             'dom_distiller/core/task_tracker.cc',
87             'dom_distiller/core/task_tracker.h',
88             'dom_distiller/core/theme_list.h',
89             'dom_distiller/core/url_constants.cc',
90             'dom_distiller/core/url_constants.h',
91             'dom_distiller/core/url_utils_android.cc',
92             'dom_distiller/core/url_utils_android.h',
93             'dom_distiller/core/url_utils.cc',
94             'dom_distiller/core/url_utils.h',
95             'dom_distiller/core/viewer.cc',
96             'dom_distiller/core/viewer.h',
97           ],
98           'conditions': [
99             ['OS == "android"', {
100               'dependencies': [
101                 'dom_distiller_core_jni_headers',
102               ],
103             }],
104           ],
105         },
106         {
107           # GN version: components/dom_distiller/core:test_support
108           'target_name': 'dom_distiller_test_support',
109           'type': 'static_library',
110           'dependencies': [
111             'dom_distiller_core',
112             'components.gyp:leveldb_proto_test_support',
113             '../sync/sync.gyp:sync',
114             '../testing/gmock.gyp:gmock',
115           ],
116           'include_dirs': [
117             '..',
118           ],
119           'sources': [
120             'dom_distiller/core/dom_distiller_test_util.cc',
121             'dom_distiller/core/dom_distiller_test_util.h',
122             'dom_distiller/core/fake_distiller.cc',
123             'dom_distiller/core/fake_distiller.h',
124             'dom_distiller/core/fake_distiller_page.cc',
125             'dom_distiller/core/fake_distiller_page.h',
126           ],
127         },
128         {
129           # GN version: //components/dom_distiller/core/proto
130           'target_name': 'distilled_page_proto',
131           'type': 'static_library',
132           'sources': [
133             'dom_distiller/core/proto/distilled_article.proto',
134             'dom_distiller/core/proto/distilled_page.proto',
135           ],
136           'variables': {
137             'proto_in_dir': 'dom_distiller/core/proto',
138             'proto_out_dir': 'components/dom_distiller/core/proto',
139           },
140           'includes': [ '../build/protoc.gypi' ]
141         },
142       ],
143       'conditions': [
144         ['OS != "ios"', {
145           'targets': [
146             {
147               # GN version: //components/dom_distiller/content
148               'target_name': 'dom_distiller_content',
149               'type': 'static_library',
150               'dependencies': [
151                 '../content/content.gyp:content_browser',
152                 '../net/net.gyp:net',
153                 '../skia/skia.gyp:skia',
154                 '../sync/sync.gyp:sync',
155                 'components_resources.gyp:components_resources',
156                 'components_strings.gyp:components_strings',
157                 'dom_distiller_core',
158               ],
159               'include_dirs': [
160                 '..',
161               ],
162               'sources': [
163                 'dom_distiller/content/distiller_page_web_contents.cc',
164                 'dom_distiller/content/distiller_page_web_contents.h',
165                 'dom_distiller/content/dom_distiller_viewer_source.cc',
166                 'dom_distiller/content/dom_distiller_viewer_source.h',
167                 'dom_distiller/content/web_contents_main_frame_observer.cc',
168                 'dom_distiller/content/web_contents_main_frame_observer.h',
169               ],
170             },
171           ],
172         }],
173         ['OS=="android"', {
174           'targets': [
175             {
176               'target_name': 'dom_distiller_core_java',
177               'type': 'none',
178               'dependencies': [
179                 'dom_distiller_core_theme_java',
180                 '../base/base.gyp:base',
181               ],
182               'variables': {
183                 'java_in_dir': 'dom_distiller/android/java',
184               },
185               'includes': [ '../build/java.gypi' ],
186             },
187             {
188               'target_name': 'dom_distiller_core_jni_headers',
189               'type': 'none',
190               'sources': [
191                 'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java',
192                 'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java',
193                 'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java',
194               ],
195               'variables': {
196                 'jni_gen_package': 'dom_distiller_core',
197               },
198               'includes': [ '../build/jni_generator.gypi' ],
199             },
200             {
201               'target_name': 'dom_distiller_core_theme_java',
202               'type': 'none',
203               'sources': [
204                 'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/Theme.template',
205               ],
206               'variables': {
207                 'package_name': 'org/chromium/components/dom_distiller/core',
208                 'template_deps': ['dom_distiller/core/theme_list.h'],
209               },
210               'includes': [ '../build/android/java_cpp_template.gypi' ],
211             },
212           ],
213         }],
214       ],
215     }],
216   ],