summaryrefslogtreecommitdiffstats
path: root/components/dom_distiller.gypi
blob: 589080765f5137c248570ae44dc292f4506e8ee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'targets': [
    {
      # GN version: //components/dom_distiller/webui
      'target_name': 'dom_distiller_webui',
      'type': 'static_library',
      'dependencies': [
        '../base/base.gyp:base',
        '../content/content.gyp:content_browser',
        '../net/net.gyp:net',
        '../skia/skia.gyp:skia',
        '../sync/sync.gyp:sync',
        '../url/url.gyp:url_lib',
        'components_resources.gyp:components_resources',
        'components_strings.gyp:components_strings',
        'dom_distiller_core',
        'dom_distiller_protos',
      ],
      'include_dirs': [
        '..',
      ],
      'sources': [
        'dom_distiller/webui/dom_distiller_handler.cc',
        'dom_distiller/webui/dom_distiller_handler.h',
        'dom_distiller/webui/dom_distiller_ui.cc',
        'dom_distiller/webui/dom_distiller_ui.h',
      ],
    },
    {
      # GN version: //components/dom_distiller/core
      'target_name': 'dom_distiller_core',
      'type': 'static_library',
      'dependencies': [
        '../base/base.gyp:base',
        '../base/base.gyp:base_prefs',
        '../skia/skia.gyp:skia',
        '../sync/sync.gyp:sync',
        '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
        '../third_party/re2/re2.gyp:re2',
        'components.gyp:leveldb_proto',
        'components_resources.gyp:components_resources',
        'components_strings.gyp:components_strings',
        'dom_distiller_protos',
        'pref_registry',
        'variations',
      ],
      'include_dirs': [
        '..',
      ],
      'export_dependent_settings': [
        'dom_distiller_protos',
        '../third_party/dom_distiller_js/dom_distiller_js.gyp:dom_distiller_js_proto',
      ],
      'sources': [
        'dom_distiller/android/component_jni_registrar.cc',
        'dom_distiller/android/component_jni_registrar.h',
        'dom_distiller/core/article_attachments_data.cc',
        'dom_distiller/core/article_attachments_data.h',
        'dom_distiller/core/article_distillation_update.cc',
        'dom_distiller/core/article_distillation_update.h',
        'dom_distiller/core/article_entry.cc',
        'dom_distiller/core/article_entry.h',
        'dom_distiller/core/distillable_page_detector.cc',
        'dom_distiller/core/distillable_page_detector.h',
        'dom_distiller/core/distilled_content_store.cc',
        'dom_distiller/core/distilled_content_store.h',
        'dom_distiller/core/distilled_page_prefs.cc',
        'dom_distiller/core/distilled_page_prefs.h',
        'dom_distiller/core/distilled_page_prefs_android.cc',
        'dom_distiller/core/distilled_page_prefs_android.h',
        'dom_distiller/core/distiller.cc',
        'dom_distiller/core/distiller.h',
        'dom_distiller/core/distiller_page.cc',
        'dom_distiller/core/distiller_page.h',
        'dom_distiller/core/distiller_url_fetcher.cc',
        'dom_distiller/core/distiller_url_fetcher.h',
        'dom_distiller/core/dom_distiller_constants.cc',
        'dom_distiller/core/dom_distiller_constants.h',
        'dom_distiller/core/dom_distiller_features.cc',
        'dom_distiller/core/dom_distiller_features.h',
        'dom_distiller/core/dom_distiller_model.cc',
        'dom_distiller/core/dom_distiller_model.h',
        'dom_distiller/core/dom_distiller_observer.h',
        'dom_distiller/core/dom_distiller_request_view_base.cc',
        'dom_distiller/core/dom_distiller_request_view_base.h',
        'dom_distiller/core/dom_distiller_service.cc',
        'dom_distiller/core/dom_distiller_service.h',
        'dom_distiller/core/dom_distiller_service_android.cc',
        'dom_distiller/core/dom_distiller_service_android.h',
        'dom_distiller/core/dom_distiller_store.cc',
        'dom_distiller/core/dom_distiller_store.h',
        'dom_distiller/core/dom_distiller_switches.cc',
        'dom_distiller/core/dom_distiller_switches.h',
        'dom_distiller/core/experiments.cc',
        'dom_distiller/core/experiments.h',
        'dom_distiller/core/feedback_reporter.cc',
        'dom_distiller/core/feedback_reporter.h',
        'dom_distiller/core/font_family_list.h',
        'dom_distiller/core/page_features.cc',
        'dom_distiller/core/page_features.h',
        'dom_distiller/core/task_tracker.cc',
        'dom_distiller/core/task_tracker.h',
        'dom_distiller/core/theme_list.h',
        'dom_distiller/core/url_constants.cc',
        'dom_distiller/core/url_constants.h',
        'dom_distiller/core/url_utils.cc',
        'dom_distiller/core/url_utils.h',
        'dom_distiller/core/url_utils_android.cc',
        'dom_distiller/core/url_utils_android.h',
        'dom_distiller/core/viewer.cc',
        'dom_distiller/core/viewer.h',
      ],
      'conditions': [
        ['OS == "android"', {
          'dependencies': [
            'dom_distiller_core_jni_headers',
          ],
        }],
      ],
    },
    {
      # GN version: components/dom_distiller/core:test_support
      'target_name': 'dom_distiller_test_support',
      'type': 'static_library',
      'dependencies': [
        'dom_distiller_core',
        'components.gyp:leveldb_proto_test_support',
        '../sync/sync.gyp:sync',
        '../testing/gmock.gyp:gmock',
        '../url/url.gyp:url_lib',
      ],
      'include_dirs': [
        '..',
      ],
      'sources': [
        'dom_distiller/core/dom_distiller_test_util.cc',
        'dom_distiller/core/dom_distiller_test_util.h',
        'dom_distiller/core/fake_distiller.cc',
        'dom_distiller/core/fake_distiller.h',
        'dom_distiller/core/fake_distiller_page.cc',
        'dom_distiller/core/fake_distiller_page.h',
        'dom_distiller/core/test_request_view_handle.h',
      ],
    },
    {
      # GN version: //components/dom_distiller/core/proto
      'target_name': 'dom_distiller_protos',
      'type': 'static_library',
      'sources': [
        'dom_distiller/core/proto/adaboost.proto',
        'dom_distiller/core/proto/distilled_article.proto',
        'dom_distiller/core/proto/distilled_page.proto',
      ],
      'variables': {
        'proto_in_dir': 'dom_distiller/core/proto',
        'proto_out_dir': 'components/dom_distiller/core/proto',
      },
      'includes': [ '../build/protoc.gypi' ]
    },
  ],
  'conditions': [
    ['OS != "ios"', {
      'targets': [
        {
          # GN version: //components/dom_distiller/content:content_browser
          'target_name': 'dom_distiller_content_browser',
          'type': 'static_library',
          'dependencies': [
            '../base/base.gyp:base',
            '../content/content.gyp:content_browser',
            '../net/net.gyp:net',
            '../skia/skia.gyp:skia',
            '../sync/sync.gyp:sync',
            '../ui/gfx/gfx.gyp:gfx',
            '../url/url.gyp:url_lib',
            'components_resources.gyp:components_resources',
            'components_strings.gyp:components_strings',
            'dom_distiller_core',
            'dom_distiller_protos',
          ],
          'include_dirs': [
            '..',
          ],
          'sources': [
            'dom_distiller/content/browser/distillable_page_utils.cc',
            'dom_distiller/content/browser/distillable_page_utils.h',
            'dom_distiller/content/browser/distillable_page_utils_android.cc',
            'dom_distiller/content/browser/distillable_page_utils_android.h',
            'dom_distiller/content/browser/distiller_javascript_utils.cc',
            'dom_distiller/content/browser/distiller_javascript_utils.h',
            'dom_distiller/content/browser/distiller_page_web_contents.cc',
            'dom_distiller/content/browser/distiller_page_web_contents.h',
            'dom_distiller/content/browser/dom_distiller_viewer_source.cc',
            'dom_distiller/content/browser/dom_distiller_viewer_source.h',
            'dom_distiller/content/browser/external_feedback_reporter.h',
            'dom_distiller/content/browser/web_contents_main_frame_observer.cc',
            'dom_distiller/content/browser/web_contents_main_frame_observer.h',
          ],
          'conditions': [
            ['OS == "android"', {
              'dependencies': [
                'dom_distiller_content_jni_headers',
                'dom_distiller_core_jni_headers',
              ],
            }],
          ],
        },
      ],
    }],
    ['OS=="ios"', {
      'targets': [
        {
          'target_name': 'dom_distiller_ios',
          'type': 'static_library',
          'dependencies': [
            '../ios/provider/ios_provider_web.gyp:ios_provider_web',
            'dom_distiller_protos',
            'dom_distiller_core',
          ],
          'include_dirs': [
            '..',
          ],
          'sources': [
            'dom_distiller/ios/distiller_page_factory_ios.h',
            'dom_distiller/ios/distiller_page_factory_ios.mm',
            'dom_distiller/ios/distiller_page_ios.h',
            'dom_distiller/ios/distiller_page_ios.mm',
          ],
        },
      ],
    }],
    ['OS=="android"', {
      'targets': [
        {
          # TODO(cjhopman): remove this when it is rolled downstream.
          'target_name': 'dom_distiller_core_java',
          'type': 'none',
          'dependencies': [
            'dom_distiller_java',
          ],
        },
        {
          # GN: //components/dom_distiller/android:dom_distiller_java
          'target_name': 'dom_distiller_java',
          'type': 'none',
          'dependencies': [
            'dom_distiller_core_font_family_java',
            'dom_distiller_core_theme_java',
            '../base/base.gyp:base',
            '../content/content.gyp:content_java',
          ],
          'variables': {
            'java_in_dir': 'dom_distiller/android/java',
          },
          'includes': [ '../build/java.gypi' ],
        },
        {
          # GN: //components/dom_distiller/android:dom_distiller_core_font_family_javagen
          'target_name': 'dom_distiller_core_font_family_java',
          'type': 'none',
          'sources': [
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/FontFamily.template',
          ],
          'variables': {
            'package_name': 'org/chromium/components/dom_distiller/core',
            'template_deps': ['dom_distiller/core/font_family_list.h'],
          },
          'includes': [ '../build/android/java_cpp_template.gypi' ],
        },
        {
          # GN: //components/dom_distiller/content:jni_headers
          'target_name': 'dom_distiller_content_jni_headers',
          'type': 'none',
          'sources': [
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java',
          ],
          'variables': {
            'jni_gen_package': 'dom_distiller_content',
          },
          'includes': [ '../build/jni_generator.gypi' ],
        },
        {
          # GN: //components/dom_distiller/core:jni_headers
          'target_name': 'dom_distiller_core_jni_headers',
          'type': 'none',
          'sources': [
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java',
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java',
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java',
          ],
          'variables': {
            'jni_gen_package': 'dom_distiller_core',
          },
          'includes': [ '../build/jni_generator.gypi' ],
        },
        {
          # GN: //components/dom_distiller/android:dom_distiller_core_theme_javagen
          'target_name': 'dom_distiller_core_theme_java',
          'type': 'none',
          'sources': [
            'dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/Theme.template',
          ],
          'variables': {
            'package_name': 'org/chromium/components/dom_distiller/core',
            'template_deps': ['dom_distiller/core/theme_list.h'],
          },
          'includes': [ '../build/android/java_cpp_template.gypi' ],
        },
      ],
    }],
  ],
}