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