summaryrefslogtreecommitdiffstats
path: root/components/translate.gypi
blob: a9a3cc8162e1af4bf2b15124d9a99d9fc8acc2dc (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
# 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/translate/core/browser
      'target_name': 'translate_core_browser',
      'type': 'static_library',
      'dependencies': [
        '../base/base.gyp:base',
        '../base/base.gyp:base_i18n',
        '../google_apis/google_apis.gyp:google_apis',
        '../net/net.gyp:net',
        '../ui/base/ui_base.gyp:ui_base',
        '../url/url.gyp:url_lib',
        'components_resources.gyp:components_resources',
        'components_strings.gyp:components_strings',
        'data_use_measurement_core',
        'infobars_core',
        'language_usage_metrics',
        'pref_registry',
        'translate_core_common',
      ],
      'include_dirs': [
        '..',
      ],
      'sources': [
        # Note: sources list duplicated in GN build.
        'translate/core/browser/language_state.cc',
        'translate/core/browser/language_state.h',
        'translate/core/browser/page_translated_details.h',
        'translate/core/browser/translate_accept_languages.cc',
        'translate/core/browser/translate_accept_languages.h',
        'translate/core/browser/translate_browser_metrics.cc',
        'translate/core/browser/translate_browser_metrics.h',
        'translate/core/browser/translate_client.h',
        'translate/core/browser/translate_download_manager.cc',
        'translate/core/browser/translate_download_manager.h',
        'translate/core/browser/translate_driver.h',
        'translate/core/browser/translate_error_details.h',
        'translate/core/browser/translate_event_details.cc',
        'translate/core/browser/translate_event_details.h',
        'translate/core/browser/translate_experiment.cc',
        'translate/core/browser/translate_experiment.h',
        'translate/core/browser/translate_language_list.cc',
        'translate/core/browser/translate_language_list.h',
        'translate/core/browser/translate_manager.cc',
        'translate/core/browser/translate_manager.h',
        'translate/core/browser/translate_prefs.cc',
        'translate/core/browser/translate_prefs.h',
        'translate/core/browser/translate_script.cc',
        'translate/core/browser/translate_script.h',
        'translate/core/browser/translate_step.h',
        'translate/core/browser/translate_ui_delegate.cc',
        'translate/core/browser/translate_ui_delegate.h',
        'translate/core/browser/translate_url_fetcher.cc',
        'translate/core/browser/translate_url_fetcher.h',
        'translate/core/browser/translate_url_util.cc',
        'translate/core/browser/translate_url_util.h',
      ],
      'conditions': [
        ['use_aura==0', {
          'sources': [
            'translate/core/browser/translate_infobar_delegate.cc',
            'translate/core/browser/translate_infobar_delegate.h',
          ],
        }],
        ['OS == "mac"', {
          'sources': [
            'translate/core/browser/options_menu_model.cc',
            'translate/core/browser/options_menu_model.h',
          ],
        }],
      ],
    },
    {
      # GN version: //components/translate/core/common
      'target_name': 'translate_core_common',
      'type': 'static_library',
      'dependencies': [
        '../base/base.gyp:base',
        '../url/url.gyp:url_lib',
      ],
      'include_dirs': [
        '..',
      ],
      'sources': [
        # Note: sources list duplicated in GN build.
        'translate/core/common/language_detection_details.cc',
        'translate/core/common/language_detection_details.h',
        'translate/core/common/translate_constants.cc',
        'translate/core/common/translate_constants.h',
        'translate/core/common/translate_errors.h',
        'translate/core/common/translate_metrics.cc',
        'translate/core/common/translate_metrics.h',
        'translate/core/common/translate_pref_names.cc',
        'translate/core/common/translate_pref_names.h',
        'translate/core/common/translate_switches.cc',
        'translate/core/common/translate_switches.h',
        'translate/core/common/translate_util.cc',
        'translate/core/common/translate_util.h',
      ],
    },
    {
      # GN version: //components/translate/core/language_detection
      'target_name': 'translate_core_language_detection',
      'type': 'static_library',
      'dependencies': [
        'translate_core_common',
        '../base/base.gyp:base',
        '../url/url.gyp:url_lib',
      ],
      'include_dirs': [
        '..',
      ],
      'sources': [
        # Note: sources list duplicated in GN build.
        'translate/core/language_detection/language_detection_util.cc',
        'translate/core/language_detection/language_detection_util.h',
      ],
      'conditions': [
        ['cld_version==1', {
          'dependencies': [
            '<(DEPTH)/third_party/cld/cld.gyp:cld',
          ],
        }],
        ['cld_version==2', {
          'dependencies': [
            '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
          ],
        }],
      ],
    },
  ],
  'conditions': [
    ['OS != "ios"', {
      'targets': [
        {
          # GN version: //components/translate/content/browser
          'target_name': 'translate_content_browser',
          'type': 'static_library',
          'dependencies': [
            'translate_content_common',
            'translate_core_browser',
            '../base/base.gyp:base',
            '../content/content.gyp:content_browser',
          ],
          'include_dirs': [
            '..',
          ],
          'sources': [
            # Note: sources list duplicated in GN build.
            'translate/content/browser/browser_cld_data_provider.cc',
            'translate/content/browser/browser_cld_data_provider.h',
            'translate/content/browser/browser_cld_data_provider_factory.cc',
            'translate/content/browser/browser_cld_data_provider_factory.h',
            'translate/content/browser/browser_cld_utils.cc',
            'translate/content/browser/browser_cld_utils.h',
            'translate/content/browser/content_translate_driver.cc',
            'translate/content/browser/content_translate_driver.h',
            'translate/content/browser/data_file_browser_cld_data_provider.cc',
            'translate/content/browser/data_file_browser_cld_data_provider.h',
          ],
        },
        {
          # GN version: //components/translate/content/common
          'target_name': 'translate_content_common',
          'type': 'static_library',
          'dependencies': [
            'translate_core_common',
            'translate_core_language_detection',
            '../base/base.gyp:base',
            '../content/content.gyp:content_common',
            '../ipc/ipc.gyp:ipc',
          ],
          'include_dirs': [
            '..',
          ],
          'sources': [
            # Note: sources list duplicated in GN build.
            'translate/content/common/cld_data_source.cc',
            'translate/content/common/cld_data_source.h',
            'translate/content/common/data_file_cld_data_provider_messages.cc',
            'translate/content/common/data_file_cld_data_provider_messages.h',
            'translate/content/common/translate_messages.cc',
            'translate/content/common/translate_messages.h',
           ],
        },
        {
          # GN version: //components/translate/content/renderer
          'target_name': 'translate_content_renderer',
          'type': 'static_library',
          'dependencies': [
            'translate_content_common',
            'translate_core_common',
            'translate_core_language_detection',
            '../base/base.gyp:base',
            '../content/content.gyp:content_common',
            '../content/content.gyp:content_renderer',
            '../ipc/ipc.gyp:ipc',
            '../third_party/WebKit/public/blink.gyp:blink',
            '../url/url.gyp:url_lib',
            '../v8/tools/gyp/v8.gyp:v8',
          ],
          'include_dirs': [
            '..',
          ],
          'sources': [
            # Note: sources list duplicated in GN build.
            'translate/content/renderer/renderer_cld_data_provider.cc',
            'translate/content/renderer/renderer_cld_data_provider.h',
            'translate/content/renderer/renderer_cld_data_provider_factory.cc',
            'translate/content/renderer/renderer_cld_data_provider_factory.h',
            'translate/content/renderer/renderer_cld_utils.cc',
            'translate/content/renderer/renderer_cld_utils.h',
            'translate/content/renderer/translate_helper.cc',
            'translate/content/renderer/translate_helper.h',
           ],
          'conditions': [
            ['cld_version==2', {
              'dependencies': [
                '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
              ],
              'sources': [
                'translate/content/renderer/data_file_renderer_cld_data_provider.cc',
                'translate/content/renderer/data_file_renderer_cld_data_provider.h',
              ],
            }],
          ],
        },
      ],
    }],
    ['OS == "ios"', {
      'targets': [
        {
          # GN version: //components/translate/ios/browser
          'target_name': 'translate_ios_browser',
          'type': 'static_library',
          'include_dirs': [
            '..',
          ],
          'dependencies': [
            'translate_core_language_detection',
            'translate_core_browser',
            'translate_core_common',
            'translate_ios_injected_js',
            '../base/base.gyp:base',
            '../ios/web/ios_web.gyp:ios_web',
            '../url/url.gyp:url_lib',
          ],
          'sources': [
            'translate/ios/browser/ios_translate_driver.h',
            'translate/ios/browser/ios_translate_driver.mm',
            'translate/ios/browser/js_language_detection_manager.h',
            'translate/ios/browser/js_language_detection_manager.mm',
            'translate/ios/browser/js_translate_manager.h',
            'translate/ios/browser/js_translate_manager.mm',
            'translate/ios/browser/language_detection_controller.h',
            'translate/ios/browser/language_detection_controller.mm',
            'translate/ios/browser/translate_controller.h',
            'translate/ios/browser/translate_controller.mm',
          ],
        },
        {
          # GN version: //components/translate/ios/browser:injected_js
          'target_name': 'translate_ios_injected_js',
          'type': 'none',
          'sources': [
            'translate/ios/browser/resources/language_detection.js',
            'translate/ios/browser/resources/translate_ios.js',
          ],
          'link_settings': {
            'mac_bundle_resources': [
              '<(SHARED_INTERMEDIATE_DIR)/translate_ios.js',
              '<(SHARED_INTERMEDIATE_DIR)/language_detection.js',
            ],
          },
          'includes': [
            '../ios/web/js_compile_checked.gypi',
          ],
        },
      ],
    }],
  ],
}