OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
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 'variations', | |
26 ], | |
27 'include_dirs': [ | |
28 '..', | |
29 ], | |
30 'sources': [ | |
31 # Note: sources list duplicated in GN build. | |
32 'translate/core/browser/language_state.cc', | |
33 'translate/core/browser/language_state.h', | |
34 'translate/core/browser/page_translated_details.h', | |
35 'translate/core/browser/translate_accept_languages.cc', | |
36 'translate/core/browser/translate_accept_languages.h', | |
37 'translate/core/browser/translate_browser_metrics.cc', | |
38 'translate/core/browser/translate_browser_metrics.h', | |
39 'translate/core/browser/translate_client.h', | |
40 'translate/core/browser/translate_download_manager.cc', | |
41 'translate/core/browser/translate_download_manager.h', | |
42 'translate/core/browser/translate_driver.h', | |
43 'translate/core/browser/translate_error_details.h', | |
44 'translate/core/browser/translate_event_details.cc', | |
45 'translate/core/browser/translate_event_details.h', | |
46 'translate/core/browser/translate_experiment.cc', | |
47 'translate/core/browser/translate_experiment.h', | |
48 'translate/core/browser/translate_language_list.cc', | |
49 'translate/core/browser/translate_language_list.h', | |
50 'translate/core/browser/translate_manager.cc', | |
51 'translate/core/browser/translate_manager.h', | |
52 'translate/core/browser/translate_prefs.cc', | |
53 'translate/core/browser/translate_prefs.h', | |
54 'translate/core/browser/translate_script.cc', | |
55 'translate/core/browser/translate_script.h', | |
56 'translate/core/browser/translate_step.h', | |
57 'translate/core/browser/translate_ui_delegate.cc', | |
58 'translate/core/browser/translate_ui_delegate.h', | |
59 'translate/core/browser/translate_url_fetcher.cc', | |
60 'translate/core/browser/translate_url_fetcher.h', | |
61 'translate/core/browser/translate_url_util.cc', | |
62 'translate/core/browser/translate_url_util.h', | |
63 ], | |
64 'conditions': [ | |
65 ['use_aura==0', { | |
66 'sources': [ | |
67 'translate/core/browser/translate_infobar_delegate.cc', | |
68 'translate/core/browser/translate_infobar_delegate.h', | |
69 ], | |
70 }], | |
71 ['OS == "mac"', { | |
72 'sources': [ | |
73 'translate/core/browser/options_menu_model.cc', | |
74 'translate/core/browser/options_menu_model.h', | |
75 ], | |
76 }], | |
77 ], | |
78 }, | |
79 { | |
80 # GN version: //components/translate/core/common | |
81 'target_name': 'translate_core_common', | |
82 'type': 'static_library', | |
83 'dependencies': [ | |
84 '../base/base.gyp:base', | |
85 '../url/url.gyp:url_lib', | |
86 ], | |
87 'include_dirs': [ | |
88 '..', | |
89 ], | |
90 'sources': [ | |
91 # Note: sources list duplicated in GN build. | |
92 'translate/core/common/language_detection_details.cc', | |
93 'translate/core/common/language_detection_details.h', | |
94 'translate/core/common/translate_constants.cc', | |
95 'translate/core/common/translate_constants.h', | |
96 'translate/core/common/translate_errors.h', | |
97 'translate/core/common/translate_metrics.cc', | |
98 'translate/core/common/translate_metrics.h', | |
99 'translate/core/common/translate_pref_names.cc', | |
100 'translate/core/common/translate_pref_names.h', | |
101 'translate/core/common/translate_switches.cc', | |
102 'translate/core/common/translate_switches.h', | |
103 'translate/core/common/translate_util.cc', | |
104 'translate/core/common/translate_util.h', | |
105 ], | |
106 }, | |
107 { | |
108 # GN version: //components/translate/core/language_detection | |
109 'target_name': 'translate_core_language_detection', | |
110 'type': 'static_library', | |
111 'dependencies': [ | |
112 'translate_core_common', | |
113 '../base/base.gyp:base', | |
114 '../url/url.gyp:url_lib', | |
115 '../third_party/cld_2/cld_2.gyp:cld_2', | |
116 ], | |
117 'include_dirs': [ | |
118 '..', | |
119 ], | |
120 'sources': [ | |
121 # Note: sources list duplicated in GN build. | |
122 'translate/core/language_detection/language_detection_util.cc', | |
123 'translate/core/language_detection/language_detection_util.h', | |
124 ], | |
125 }, | |
126 ], | |
127 'conditions': [ | |
128 ['OS != "ios"', { | |
129 'targets': [ | |
130 { | |
131 # GN version: //components/translate/content/browser | |
132 'target_name': 'translate_content_browser', | |
133 'type': 'static_library', | |
134 'dependencies': [ | |
135 'translate_content_common', | |
136 'translate_core_browser', | |
137 '../base/base.gyp:base', | |
138 '../content/content.gyp:content_browser', | |
139 ], | |
140 'include_dirs': [ | |
141 '..', | |
142 ], | |
143 'sources': [ | |
144 # Note: sources list duplicated in GN build. | |
145 'translate/content/browser/content_translate_driver.cc', | |
146 'translate/content/browser/content_translate_driver.h', | |
147 ], | |
148 }, | |
149 { | |
150 # GN version: //components/translate/content/common | |
151 'target_name': 'translate_content_common', | |
152 'type': 'static_library', | |
153 'variables': { | |
154 'mojom_typemaps': [ | |
155 'translate/content/common/translate.typemap', | |
156 '<(DEPTH)/mojo/common/common_custom_types.typemap', | |
157 '<(DEPTH)/url/mojo/gurl.typemap', | |
158 ], | |
159 }, | |
160 'sources': [ | |
161 'translate/content/common/translate_struct_traits.cc', | |
162 'translate/content/common/translate.mojom', | |
163 ], | |
164 'export_dependent_settings': [ | |
165 '../mojo/mojo_base.gyp:mojo_common_custom_types_mojom', | |
166 '../url/url.gyp:url_mojom', | |
167 ], | |
168 'dependencies': [ | |
169 'translate_core_common', | |
170 'translate_core_language_detection', | |
171 '../base/base.gyp:base', | |
172 '../mojo/mojo_base.gyp:mojo_common_custom_types_mojom', | |
173 '../mojo/mojo_public.gyp:mojo_cpp_bindings', | |
174 '../url/url.gyp:url_mojom', | |
175 ], | |
176 'includes': [ '../mojo/mojom_bindings_generator.gypi' ], | |
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 '../third_party/WebKit/public/blink.gyp:blink', | |
190 '../third_party/cld_2/cld_2.gyp:cld_2', | |
191 '../url/url.gyp:url_lib', | |
192 '../v8/src/v8.gyp:v8', | |
193 ], | |
194 'include_dirs': [ | |
195 '..', | |
196 ], | |
197 'sources': [ | |
198 # Note: sources list duplicated in GN build. | |
199 'translate/content/renderer/translate_helper.cc', | |
200 'translate/content/renderer/translate_helper.h', | |
201 ], | |
202 }, | |
203 ], | |
204 }], | |
205 ['OS == "ios"', { | |
206 'targets': [ | |
207 { | |
208 # GN version: //components/translate/ios/browser | |
209 'target_name': 'translate_ios_browser', | |
210 'type': 'static_library', | |
211 'include_dirs': [ | |
212 '..', | |
213 ], | |
214 'dependencies': [ | |
215 'translate_core_language_detection', | |
216 'translate_core_browser', | |
217 'translate_core_common', | |
218 'translate_ios_injected_js', | |
219 '../base/base.gyp:base', | |
220 '../ios/web/ios_web.gyp:ios_web', | |
221 '../url/url.gyp:url_lib', | |
222 ], | |
223 'sources': [ | |
224 'translate/ios/browser/ios_translate_driver.h', | |
225 'translate/ios/browser/ios_translate_driver.mm', | |
226 'translate/ios/browser/js_language_detection_manager.h', | |
227 'translate/ios/browser/js_language_detection_manager.mm', | |
228 'translate/ios/browser/js_translate_manager.h', | |
229 'translate/ios/browser/js_translate_manager.mm', | |
230 'translate/ios/browser/language_detection_controller.h', | |
231 'translate/ios/browser/language_detection_controller.mm', | |
232 'translate/ios/browser/translate_controller.h', | |
233 'translate/ios/browser/translate_controller.mm', | |
234 ], | |
235 }, | |
236 { | |
237 # GN version: //components/translate/ios/browser:injected_js | |
238 'target_name': 'translate_ios_injected_js', | |
239 'type': 'none', | |
240 'sources': [ | |
241 'translate/ios/browser/resources/language_detection.js', | |
242 'translate/ios/browser/resources/translate_ios.js', | |
243 ], | |
244 'link_settings': { | |
245 'mac_bundle_resources': [ | |
246 '<(SHARED_INTERMEDIATE_DIR)/translate_ios.js', | |
247 '<(SHARED_INTERMEDIATE_DIR)/language_detection.js', | |
248 ], | |
249 }, | |
250 'includes': [ | |
251 '../ios/web/js_compile_checked.gypi', | |
252 ], | |
253 }, | |
254 ], | |
255 }], | |
256 ], | |
257 } | |
OLD | NEW |