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