Nukes ViewTree::SetAccessPolicy
[chromium-blink-merge.git] / components / translate.gypi
blobf550365cb18e44179033e23ee2935fafbcb328ef
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/translate/core/browser
9       'target_name': 'translate_core_browser',
10       'type': 'static_library',
11       'dependencies': [
12         '../base/base.gyp:base',
13         '../base/base.gyp:base_i18n',
14         '../google_apis/google_apis.gyp:google_apis',
15         '../net/net.gyp:net',
16         '../ui/base/ui_base.gyp:ui_base',
17         '../url/url.gyp:url_lib',
18         'components_resources.gyp:components_resources',
19         'components_strings.gyp:components_strings',
20         'data_use_measurement_core',
21         'infobars_core',
22         'language_usage_metrics',
23         'pref_registry',
24         'translate_core_common',
25       ],
26       'include_dirs': [
27         '..',
28       ],
29       'sources': [
30         # Note: sources list duplicated in GN build.
31         'translate/core/browser/language_state.cc',
32         'translate/core/browser/language_state.h',
33         'translate/core/browser/options_menu_model.cc',
34         'translate/core/browser/options_menu_model.h',
35         'translate/core/browser/page_translated_details.h',
36         'translate/core/browser/translate_accept_languages.cc',
37         'translate/core/browser/translate_accept_languages.h',
38         'translate/core/browser/translate_browser_metrics.cc',
39         'translate/core/browser/translate_browser_metrics.h',
40         'translate/core/browser/translate_client.h',
41         'translate/core/browser/translate_download_manager.cc',
42         'translate/core/browser/translate_download_manager.h',
43         'translate/core/browser/translate_driver.h',
44         'translate/core/browser/translate_error_details.h',
45         'translate/core/browser/translate_event_details.cc',
46         'translate/core/browser/translate_event_details.h',
47         'translate/core/browser/translate_infobar_delegate.cc',
48         'translate/core/browser/translate_infobar_delegate.h',
49         'translate/core/browser/translate_language_list.cc',
50         'translate/core/browser/translate_language_list.h',
51         'translate/core/browser/translate_manager.cc',
52         'translate/core/browser/translate_manager.h',
53         'translate/core/browser/translate_prefs.cc',
54         'translate/core/browser/translate_prefs.h',
55         'translate/core/browser/translate_script.cc',
56         'translate/core/browser/translate_script.h',
57         'translate/core/browser/translate_step.h',
58         'translate/core/browser/translate_ui_delegate.cc',
59         'translate/core/browser/translate_ui_delegate.h',
60         'translate/core/browser/translate_url_fetcher.cc',
61         'translate/core/browser/translate_url_fetcher.h',
62         'translate/core/browser/translate_url_util.cc',
63         'translate/core/browser/translate_url_util.h',
64        ],
65     },
66     {
67       # GN version: //components/translate/core/common
68       'target_name': 'translate_core_common',
69       'type': 'static_library',
70       'dependencies': [
71         '../base/base.gyp:base',
72         '../url/url.gyp:url_lib',
73       ],
74       'include_dirs': [
75         '..',
76       ],
77       'sources': [
78         # Note: sources list duplicated in GN build.
79         'translate/core/common/language_detection_details.cc',
80         'translate/core/common/language_detection_details.h',
81         'translate/core/common/translate_constants.cc',
82         'translate/core/common/translate_constants.h',
83         'translate/core/common/translate_errors.h',
84         'translate/core/common/translate_metrics.cc',
85         'translate/core/common/translate_metrics.h',
86         'translate/core/common/translate_pref_names.cc',
87         'translate/core/common/translate_pref_names.h',
88         'translate/core/common/translate_switches.cc',
89         'translate/core/common/translate_switches.h',
90         'translate/core/common/translate_util.cc',
91         'translate/core/common/translate_util.h',
92       ],
93     },
94     {
95       # GN version: //components/translate/core/language_detection
96       'target_name': 'translate_core_language_detection',
97       'type': 'static_library',
98       'dependencies': [
99         'translate_core_common',
100         '../base/base.gyp:base',
101         '../url/url.gyp:url_lib',
102       ],
103       'include_dirs': [
104         '..',
105       ],
106       'sources': [
107         # Note: sources list duplicated in GN build.
108         'translate/core/language_detection/language_detection_util.cc',
109         'translate/core/language_detection/language_detection_util.h',
110       ],
111       'conditions': [
112         ['cld_version==1', {
113           'dependencies': [
114             '<(DEPTH)/third_party/cld/cld.gyp:cld',
115           ],
116         }],
117         ['cld_version==2', {
118           'dependencies': [
119             '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
120           ],
121         }],
122       ],
123     },
124   ],
125   'conditions': [
126     ['OS != "ios"', {
127       'targets': [
128         {
129           # GN version: //components/translate/content/browser
130           'target_name': 'translate_content_browser',
131           'type': 'static_library',
132           'dependencies': [
133             'translate_core_browser',
134             '../base/base.gyp:base',
135             '../content/content.gyp:content_browser',
136           ],
137           'include_dirs': [
138             '..',
139           ],
140           'sources': [
141             # Note: sources list duplicated in GN build.
142             'translate/content/browser/browser_cld_data_provider.cc',
143             'translate/content/browser/browser_cld_data_provider.h',
144             'translate/content/browser/browser_cld_data_provider_factory.cc',
145             'translate/content/browser/browser_cld_data_provider_factory.h',
146             'translate/content/browser/browser_cld_utils.cc',
147             'translate/content/browser/browser_cld_utils.h',
148             'translate/content/browser/content_translate_driver.cc',
149             'translate/content/browser/content_translate_driver.h',
150             'translate/content/browser/data_file_browser_cld_data_provider.cc',
151             'translate/content/browser/data_file_browser_cld_data_provider.h',
152           ],
153         },
154         {
155           # GN version: //components/translate/content/common
156           'target_name': 'translate_content_common',
157           'type': 'static_library',
158           'dependencies': [
159             'translate_core_common',
160             'translate_core_language_detection',
161             '../base/base.gyp:base',
162             '../content/content.gyp:content_common',
163             '../ipc/ipc.gyp:ipc',
164           ],
165           'include_dirs': [
166             '..',
167           ],
168           'sources': [
169             # Note: sources list duplicated in GN build.
170             'translate/content/common/cld_data_source.cc',
171             'translate/content/common/cld_data_source.h',
172             'translate/content/common/data_file_cld_data_provider_messages.cc',
173             'translate/content/common/data_file_cld_data_provider_messages.h',
174             'translate/content/common/translate_messages.cc',
175             'translate/content/common/translate_messages.h',
176            ],
177         },
178         {
179           # GN version: //components/translate/content/renderer
180           'target_name': 'translate_content_renderer',
181           'type': 'static_library',
182           'dependencies': [
183             'translate_content_common',
184             'translate_core_common',
185             'translate_core_language_detection',
186             '../base/base.gyp:base',
187             '../content/content.gyp:content_common',
188             '../content/content.gyp:content_renderer',
189             '../ipc/ipc.gyp:ipc',
190             '../third_party/WebKit/public/blink.gyp:blink',
191             '../url/url.gyp:url_lib',
192             '../v8/tools/gyp/v8.gyp:v8',
193           ],
194           'include_dirs': [
195             '..',
196           ],
197           'sources': [
198             # Note: sources list duplicated in GN build.
199             'translate/content/renderer/renderer_cld_data_provider.cc',
200             'translate/content/renderer/renderer_cld_data_provider.h',
201             'translate/content/renderer/renderer_cld_data_provider_factory.cc',
202             'translate/content/renderer/renderer_cld_data_provider_factory.h',
203             'translate/content/renderer/renderer_cld_utils.cc',
204             'translate/content/renderer/renderer_cld_utils.h',
205             'translate/content/renderer/translate_helper.cc',
206             'translate/content/renderer/translate_helper.h',
207            ],
208           'conditions': [
209             ['cld_version==2', {
210               'dependencies': [
211                 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
212               ],
213               'sources': [
214                 'translate/content/renderer/data_file_renderer_cld_data_provider.cc',
215                 'translate/content/renderer/data_file_renderer_cld_data_provider.h',
216               ],
217             }],
218           ],
219         },
220       ],
221     }],
222     ['OS == "ios"', {
223       'targets': [
224         {
225           'target_name': 'translate_ios_browser',
226           'type': 'static_library',
227           'include_dirs': [
228             '..',
229           ],
230           'dependencies': [
231             'translate_core_language_detection',
232             'translate_core_browser',
233             'translate_core_common',
234             'translate_ios_injected_js',
235             '../base/base.gyp:base',
236             '../ios/web/ios_web.gyp:ios_web',
237             '../url/url.gyp:url_lib',
238           ],
239           'sources': [
240             'translate/ios/browser/ios_translate_driver.h',
241             'translate/ios/browser/ios_translate_driver.mm',
242             'translate/ios/browser/js_language_detection_manager.h',
243             'translate/ios/browser/js_language_detection_manager.mm',
244             'translate/ios/browser/js_translate_manager.h',
245             'translate/ios/browser/js_translate_manager.mm',
246             'translate/ios/browser/language_detection_controller.h',
247             'translate/ios/browser/language_detection_controller.mm',
248             'translate/ios/browser/translate_controller.h',
249             'translate/ios/browser/translate_controller.mm',
250           ],
251         },
252         {
253           'target_name': 'translate_ios_injected_js',
254           'type': 'none',
255           'sources': [
256             'translate/ios/browser/resources/language_detection.js',
257             'translate/ios/browser/resources/translate_ios.js',
258           ],
259           'link_settings': {
260             'mac_bundle_resources': [
261               '<(SHARED_INTERMEDIATE_DIR)/translate_ios.js',
262               '<(SHARED_INTERMEDIATE_DIR)/language_detection.js',
263             ],
264           },
265           'includes': [
266             '../ios/web/js_compile_checked.gypi',
267           ],
268         },
269       ],
270     }],
271   ],