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