Clarify and update GN build flags docs.
[chromium-blink-merge.git] / components / autofill.gypi
blob68f3f5e266fc08f6f601e51abb565bbd842aa818
1 # Copyright (c) 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/autofill/core/common
9       'target_name': 'autofill_core_common',
10       'type': 'static_library',
11       'dependencies': [
12         '../base/base.gyp:base',
13         '../base/base.gyp:base_i18n',
14         '../ui/base/ui_base.gyp:ui_base',
15         '../ui/gfx/gfx.gyp:gfx',
16         '../url/url.gyp:url_lib',
17       ],
18       'include_dirs': [
19         '..',
20       ],
21       'sources': [
22         'autofill/core/common/autofill_constants.cc',
23         'autofill/core/common/autofill_constants.h',
24         'autofill/core/common/autofill_data_validation.cc',
25         'autofill/core/common/autofill_data_validation.h',
26         'autofill/core/common/autofill_l10n_util.cc',
27         'autofill/core/common/autofill_l10n_util.h',
28         'autofill/core/common/autofill_pref_names.cc',
29         'autofill/core/common/autofill_pref_names.h',
30         'autofill/core/common/autofill_regexes.cc',
31         'autofill/core/common/autofill_regexes.h',
32         'autofill/core/common/autofill_switches.cc',
33         'autofill/core/common/autofill_switches.h',
34         'autofill/core/common/form_data.cc',
35         'autofill/core/common/form_data.h',
36         'autofill/core/common/form_data_predictions.cc',
37         'autofill/core/common/form_data_predictions.h',
38         'autofill/core/common/form_field_data.cc',
39         'autofill/core/common/form_field_data.h',
40         'autofill/core/common/form_field_data_predictions.cc',
41         'autofill/core/common/form_field_data_predictions.h',
42         'autofill/core/common/password_form.cc',
43         'autofill/core/common/password_form.h',
44         'autofill/core/common/password_form_fill_data.cc',
45         'autofill/core/common/password_form_fill_data.h',
46         'autofill/core/common/password_generation_util.cc',
47         'autofill/core/common/password_generation_util.h',
48         'autofill/core/common/save_password_progress_logger.cc',
49         'autofill/core/common/save_password_progress_logger.h',
50         'autofill/core/common/web_element_descriptor.cc',
51         'autofill/core/common/web_element_descriptor.h',
52       ],
54       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
55       'msvs_disabled_warnings': [4267, ],
56     },
58     {
59       # GN version: //components/autofill/core/browser
60       'target_name': 'autofill_core_browser',
61       'type': 'static_library',
62       'include_dirs': [
63         '..',
64       ],
65       'dependencies': [
66         '../base/base.gyp:base',
67         '../base/base.gyp:base_i18n',
68         '../base/base.gyp:base_prefs',
69         '../google_apis/google_apis.gyp:google_apis',
70         '../net/net.gyp:net',
71         '../skia/skia.gyp:skia',
72         '../sql/sql.gyp:sql',
73         '../sync/sync.gyp:sync',
74         '../third_party/fips181/fips181.gyp:fips181',
75         '../third_party/icu/icu.gyp:icui18n',
76         '../third_party/icu/icu.gyp:icuuc',
77         '../third_party/libjingle/libjingle.gyp:libjingle',
78         '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_util',
79         '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
80         '../ui/base/ui_base.gyp:ui_base',
81         '../ui/gfx/gfx.gyp:gfx',
82         '../ui/gfx/gfx.gyp:gfx_geometry',
83         '../url/url.gyp:url_lib',
84         'autofill_core_common',
85         'components_resources.gyp:components_resources',
86         'components_strings.gyp:components_strings',
87         'infobars_core',
88         'keyed_service_core',
89         'os_crypt',
90         'pref_registry',
91         'rappor',
92         'signin_core_browser',
93         'signin_core_common',
94         'webdata_common',
95       ],
96       'sources': [
97         'autofill/core/browser/address.cc',
98         'autofill/core/browser/address.h',
99         'autofill/core/browser/address_field.cc',
100         'autofill/core/browser/address_field.h',
101         'autofill/core/browser/address_i18n.cc',
102         'autofill/core/browser/address_i18n.h',
103         'autofill/core/browser/autocomplete_history_manager.cc',
104         'autofill/core/browser/autocomplete_history_manager.h',
105         'autofill/core/browser/autofill-inl.h',
106         'autofill/core/browser/autofill_cc_infobar_delegate.cc',
107         'autofill/core/browser/autofill_cc_infobar_delegate.h',
108         'autofill/core/browser/autofill_client.h',
109         'autofill/core/browser/autofill_country.cc',
110         'autofill/core/browser/autofill_country.h',
111         'autofill/core/browser/autofill_data_model.cc',
112         'autofill/core/browser/autofill_data_model.h',
113         'autofill/core/browser/autofill_download_manager.cc',
114         'autofill/core/browser/autofill_download_manager.h',
115         'autofill/core/browser/autofill_driver.h',
116         'autofill/core/browser/autofill_experiments.cc',
117         'autofill/core/browser/autofill_experiments.h',
118         'autofill/core/browser/autofill_external_delegate.cc',
119         'autofill/core/browser/autofill_external_delegate.h',
120         'autofill/core/browser/autofill_field.cc',
121         'autofill/core/browser/autofill_field.h',
122         'autofill/core/browser/autofill_ie_toolbar_import_win.cc',
123         'autofill/core/browser/autofill_ie_toolbar_import_win.h',
124         'autofill/core/browser/autofill_manager.cc',
125         'autofill/core/browser/autofill_manager.h',
126         'autofill/core/browser/autofill_manager_test_delegate.h',
127         'autofill/core/browser/autofill_metrics.cc',
128         'autofill/core/browser/autofill_metrics.h',
129         'autofill/core/browser/autofill_popup_delegate.h',
130         'autofill/core/browser/autofill_profile.cc',
131         'autofill/core/browser/autofill_profile.h',
132         'autofill/core/browser/autofill_regex_constants.cc',
133         'autofill/core/browser/autofill_regex_constants.h',
134         'autofill/core/browser/autofill_scanner.cc',
135         'autofill/core/browser/autofill_scanner.h',
136         'autofill/core/browser/autofill_server_field_info.h',
137         'autofill/core/browser/autofill_sync_constants.cc',
138         'autofill/core/browser/autofill_sync_constants.h',
139         'autofill/core/browser/autofill_type.cc',
140         'autofill/core/browser/autofill_type.h',
141         'autofill/core/browser/autofill_xml_parser.cc',
142         'autofill/core/browser/autofill_xml_parser.h',
143         'autofill/core/browser/card_unmask_delegate.cc',
144         'autofill/core/browser/card_unmask_delegate.h',
145         'autofill/core/browser/contact_info.cc',
146         'autofill/core/browser/contact_info.h',
147         'autofill/core/browser/credit_card.cc',
148         'autofill/core/browser/credit_card.h',
149         'autofill/core/browser/credit_card_field.cc',
150         'autofill/core/browser/credit_card_field.h',
151         'autofill/core/browser/detail_input.cc',
152         'autofill/core/browser/detail_input.h',
153         'autofill/core/browser/dialog_section.h',
154         'autofill/core/browser/email_field.cc',
155         'autofill/core/browser/email_field.h',
156         'autofill/core/browser/field_types.h',
157         'autofill/core/browser/form_field.cc',
158         'autofill/core/browser/form_field.h',
159         'autofill/core/browser/form_group.cc',
160         'autofill/core/browser/form_group.h',
161         'autofill/core/browser/form_structure.cc',
162         'autofill/core/browser/form_structure.h',
163         'autofill/core/browser/name_field.cc',
164         'autofill/core/browser/name_field.h',
165         'autofill/core/browser/options_util.cc',
166         'autofill/core/browser/options_util.h',
167         'autofill/core/browser/password_generator.cc',
168         'autofill/core/browser/password_generator.h',
169         'autofill/core/browser/personal_data_manager.cc',
170         'autofill/core/browser/personal_data_manager.h',
171         'autofill/core/browser/personal_data_manager_mac.mm',
172         'autofill/core/browser/personal_data_manager_observer.h',
173         'autofill/core/browser/phone_field.cc',
174         'autofill/core/browser/phone_field.h',
175         'autofill/core/browser/phone_number.cc',
176         'autofill/core/browser/phone_number.h',
177         'autofill/core/browser/phone_number_i18n.cc',
178         'autofill/core/browser/phone_number_i18n.h',
179         'autofill/core/browser/popup_item_ids.h',
180         'autofill/core/browser/server_field_types_util.cc',
181         'autofill/core/browser/server_field_types_util.h',
182         'autofill/core/browser/state_names.cc',
183         'autofill/core/browser/state_names.h',
184         'autofill/core/browser/suggestion.cc',
185         'autofill/core/browser/suggestion.h',
186         'autofill/core/browser/ui/card_unmask_prompt_controller.h',
187         'autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc',
188         'autofill/core/browser/ui/card_unmask_prompt_controller_impl.h',
189         'autofill/core/browser/ui/card_unmask_prompt_view.h',
190         'autofill/core/browser/validation.cc',
191         'autofill/core/browser/validation.h',
192         'autofill/core/browser/wallet/real_pan_wallet_client.cc',
193         'autofill/core/browser/wallet/real_pan_wallet_client.h',
194         'autofill/core/browser/webdata/autocomplete_syncable_service.cc',
195         'autofill/core/browser/webdata/autocomplete_syncable_service.h',
196         'autofill/core/browser/webdata/autofill_change.cc',
197         'autofill/core/browser/webdata/autofill_change.h',
198         'autofill/core/browser/webdata/autofill_entry.cc',
199         'autofill/core/browser/webdata/autofill_entry.h',
200         'autofill/core/browser/webdata/autofill_profile_syncable_service.cc',
201         'autofill/core/browser/webdata/autofill_profile_syncable_service.h',
202         'autofill/core/browser/webdata/autofill_table.cc',
203         'autofill/core/browser/webdata/autofill_table.h',
204         'autofill/core/browser/webdata/autofill_wallet_syncable_service.cc',
205         'autofill/core/browser/webdata/autofill_wallet_syncable_service.h',
206         'autofill/core/browser/webdata/autofill_webdata.h',
207         'autofill/core/browser/webdata/autofill_webdata_backend.h',
208         'autofill/core/browser/webdata/autofill_webdata_backend_impl.cc',
209         'autofill/core/browser/webdata/autofill_webdata_backend_impl.h',
210         'autofill/core/browser/webdata/autofill_webdata_service.cc',
211         'autofill/core/browser/webdata/autofill_webdata_service.h',
212         'autofill/core/browser/webdata/autofill_webdata_service_observer.h',
213       ],
215       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
216       'msvs_disabled_warnings': [4267, ],
217     },
219     {
220       # GN version: //components/autofill/core/browser:test_support
221       'target_name': 'autofill_core_test_support',
222       'type': 'static_library',
223       'dependencies': [
224         '../base/base.gyp:base',
225         '../base/base.gyp:base_prefs',
226         '../base/base.gyp:test_support_base',
227         '../skia/skia.gyp:skia',
228         '../testing/gtest.gyp:gtest',
229         'autofill_core_common',
230         'autofill_core_browser',
231         'os_crypt',
232         'pref_registry',
233         'rappor',
234         'signin_core_browser_test_support',
235       ],
236       'sources': [
237         'autofill/core/browser/autofill_test_utils.cc',
238         'autofill/core/browser/autofill_test_utils.h',
239         'autofill/core/browser/data_driven_test.cc',
240         'autofill/core/browser/data_driven_test.h',
241         'autofill/core/browser/suggestion_test_helpers.h',
242         'autofill/core/browser/test_autofill_client.cc',
243         'autofill/core/browser/test_autofill_client.h',
244         'autofill/core/browser/test_autofill_driver.cc',
245         'autofill/core/browser/test_autofill_driver.h',
246         'autofill/core/browser/test_autofill_external_delegate.cc',
247         'autofill/core/browser/test_autofill_external_delegate.h',
248         'autofill/core/browser/test_personal_data_manager.cc',
249         'autofill/core/browser/test_personal_data_manager.h',
250       ],
251     },
252   ],
253   'conditions': [
254     ['OS != "ios"', {
255       'targets': [
256         {
257           # GN version: //content/autofill/content/common
258           'target_name': 'autofill_content_common',
259           'type': 'static_library',
260           'dependencies': [
261             'autofill_core_common',
262             '../base/base.gyp:base',
263             '../content/content.gyp:content_common',
264             '../ipc/ipc.gyp:ipc',
265             '../third_party/WebKit/public/blink.gyp:blink_minimal',
266             '../ui/gfx/gfx.gyp:gfx',
267             '../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
268             '../url/url.gyp:url_lib',
269           ],
270           'include_dirs': [
271             '..',
272           ],
273           'sources': [
274             'autofill/content/common/autofill_message_generator.cc',
275             'autofill/content/common/autofill_message_generator.h',
276             'autofill/content/common/autofill_messages.h',
277             'autofill/content/common/autofill_param_traits_macros.h',
278           ],
279         },
281         {
282           # Protobuf compiler / generate rule for Autofill's risk integration.
283           # GN version: //components/autofill/content/browser:risk_proto
284           'target_name': 'autofill_content_risk_proto',
285           'type': 'static_library',
286           'sources': [
287             'autofill/content/browser/risk/proto/fingerprint.proto',
288           ],
289           'variables': {
290             'proto_in_dir': 'autofill/content/browser/risk/proto',
291             'proto_out_dir': 'components/autofill/content/browser/risk/proto',
292           },
293           'includes': [ '../build/protoc.gypi' ]
294         },
295        {
296          # GN version: //components/autofill/content/browser:test_support
297          'target_name': 'autofill_content_test_support',
298          'type': 'static_library',
299          'dependencies': [
300             '../testing/gmock.gyp:gmock',
301          ],
302          'sources': [
303            'autofill/content/browser/wallet/mock_wallet_client.cc',
304            'autofill/content/browser/wallet/mock_wallet_client.h',
305            'autofill/content/browser/wallet/wallet_test_util.cc',
306            'autofill/content/browser/wallet/wallet_test_util.h',
307          ],
308          'include_dirs': [ '..' ],
309        },
310        {
311           # GN version: //components/autofill/content/browser
312           'target_name': 'autofill_content_browser',
313           'type': 'static_library',
314           'include_dirs': [
315             '..',
316           ],
317           'dependencies': [
318             '../base/base.gyp:base',
319             '../base/base.gyp:base_i18n',
320             '../base/base.gyp:base_prefs',
321             '../content/content.gyp:content_browser',
322             '../content/content.gyp:content_common',
323             '../google_apis/google_apis.gyp:google_apis',
324             '../ipc/ipc.gyp:ipc',
325             '../net/net.gyp:net',
326             '../skia/skia.gyp:skia',
327             '../sql/sql.gyp:sql',
328             '../third_party/icu/icu.gyp:icui18n',
329             '../third_party/icu/icu.gyp:icuuc',
330             '../third_party/libjingle/libjingle.gyp:libjingle',
331             '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
332             '../ui/base/ui_base.gyp:ui_base',
333             '../ui/gfx/gfx.gyp:gfx',
334             '../ui/gfx/gfx.gyp:gfx_geometry',
335             '../url/url.gyp:url_lib',
336             'autofill_content_common',
337             'autofill_content_risk_proto',
338             'autofill_core_browser',
339             'autofill_core_common',
340             'components_resources.gyp:components_resources',
341             'components_strings.gyp:components_strings',
342             'os_crypt',
343             'user_prefs',
344             'webdata_common',
345           ],
346           'sources': [
347             'autofill/content/browser/content_autofill_driver.cc',
348             'autofill/content/browser/content_autofill_driver.h',
349             'autofill/content/browser/content_autofill_driver_factory.cc',
350             'autofill/content/browser/content_autofill_driver_factory.h',
351             'autofill/content/browser/request_autocomplete_manager.cc',
352             'autofill/content/browser/request_autocomplete_manager.h',
353             'autofill/content/browser/risk/fingerprint.cc',
354             'autofill/content/browser/risk/fingerprint.h',
355             'autofill/content/browser/wallet/form_field_error.cc',
356             'autofill/content/browser/wallet/form_field_error.h',
357             'autofill/content/browser/wallet/full_wallet.cc',
358             'autofill/content/browser/wallet/full_wallet.h',
359             'autofill/content/browser/wallet/gaia_account.cc',
360             'autofill/content/browser/wallet/gaia_account.h',
361             'autofill/content/browser/wallet/instrument.cc',
362             'autofill/content/browser/wallet/instrument.h',
363             'autofill/content/browser/wallet/required_action.cc',
364             'autofill/content/browser/wallet/required_action.h',
365             'autofill/content/browser/wallet/wallet_address.cc',
366             'autofill/content/browser/wallet/wallet_address.h',
367             'autofill/content/browser/wallet/wallet_client.cc',
368             'autofill/content/browser/wallet/wallet_client.h',
369             'autofill/content/browser/wallet/wallet_client_delegate.h',
370             'autofill/content/browser/wallet/wallet_items.cc',
371             'autofill/content/browser/wallet/wallet_items.h',
372             'autofill/content/browser/wallet/wallet_service_url.cc',
373             'autofill/content/browser/wallet/wallet_service_url.h',
374             'autofill/content/browser/wallet/wallet_signin_helper.cc',
375             'autofill/content/browser/wallet/wallet_signin_helper.h',
376           ],
378           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
379           'msvs_disabled_warnings': [4267, ],
380         },
382         {
383           # GN version: //components/autofill/content/renderer
384           'target_name': 'autofill_content_renderer',
385           'type': 'static_library',
386           'include_dirs': [
387             '..',
388           ],
389           'dependencies': [
390             '../base/base.gyp:base',
391             '../content/content.gyp:content_common',
392             '../content/content.gyp:content_renderer',
393             '../google_apis/google_apis.gyp:google_apis',
394             '../ipc/ipc.gyp:ipc',
395             '../net/net.gyp:net',
396             '../skia/skia.gyp:skia',
397             '../third_party/icu/icu.gyp:icui18n',
398             '../third_party/icu/icu.gyp:icuuc',
399             '../third_party/WebKit/public/blink.gyp:blink',
400             '../ui/base/ui_base.gyp:ui_base',
401             'autofill_content_common',
402             'autofill_core_common',
403             'components_strings.gyp:components_strings',
404           ],
405           'sources': [
406             'autofill/content/renderer/autofill_agent.cc',
407             'autofill/content/renderer/autofill_agent.h',
408             'autofill/content/renderer/form_autofill_util.cc',
409             'autofill/content/renderer/form_autofill_util.h',
410             'autofill/content/renderer/form_cache.cc',
411             'autofill/content/renderer/form_cache.h',
412             'autofill/content/renderer/page_click_listener.h',
413             'autofill/content/renderer/page_click_tracker.cc',
414             'autofill/content/renderer/page_click_tracker.h',
415             'autofill/content/renderer/password_autofill_agent.cc',
416             'autofill/content/renderer/password_autofill_agent.h',
417             'autofill/content/renderer/password_form_conversion_utils.cc',
418             'autofill/content/renderer/password_form_conversion_utils.h',
419             'autofill/content/renderer/password_generation_agent.cc',
420             'autofill/content/renderer/password_generation_agent.h',
421             'autofill/content/renderer/renderer_save_password_progress_logger.cc',
422             'autofill/content/renderer/renderer_save_password_progress_logger.h',
423           ],
424           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
425           'msvs_disabled_warnings': [4267, ],
426         },
427       ],
428     }],
429     ['OS == "ios"', {
430       'targets': [
431         {
432           'target_name': 'autofill_ios_browser',
433           'type': 'static_library',
434           'include_dirs': [
435             '..',
436           ],
437           'dependencies': [
438             'autofill_core_browser',
439             'autofill_core_common',
440             'autofill_ios_injected_js',
441             '../ios/provider/ios_provider_web.gyp:ios_provider_web',
442             '../ios/web/ios_web.gyp:ios_web',
443           ],
444           'sources': [
445             'autofill/ios/browser/autofill_driver_ios.h',
446             'autofill/ios/browser/autofill_driver_ios.mm',
447             'autofill/ios/browser/autofill_driver_ios_bridge.h',
448             'autofill/ios/browser/form_suggestion.h',
449             'autofill/ios/browser/form_suggestion.mm',
450             'autofill/ios/browser/js_autofill_manager.h',
451             'autofill/ios/browser/js_autofill_manager.mm',
452             'autofill/ios/browser/js_suggestion_manager.h',
453             'autofill/ios/browser/js_suggestion_manager.mm',
454           ],
455         },
456         {
457           'target_name': 'autofill_ios_injected_js',
458           'type': 'none',
459           'sources': [
460             'autofill/ios/browser/resources/autofill_controller.js',
461             'autofill/ios/browser/resources/suggestion_controller.js',
462           ],
463           'link_settings': {
464             'mac_bundle_resources': [
465               '<(SHARED_INTERMEDIATE_DIR)/autofill_controller.js',
466               '<(SHARED_INTERMEDIATE_DIR)/suggestion_controller.js',
467             ],
468           },
469           'includes': [
470             '../ios/web/js_compile.gypi',
471           ],
472         },
473       ],
474     }],
475   ],