gpu: Allow CopyTexImage to be called with StreamTextures and GLImageSync.
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blobfc6986acb2ffe1f0e3cb8023e8a3688e1aaafc4b
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   'variables': {
7     # File lists shared with GN build.
8     'chrome_common_sources': [
9       '../apps/app_shim/app_shim_launch.h',
10       '../apps/app_shim/app_shim_messages.h',
11       'common/all_messages.h',
12       'common/attrition_experiments.h',
13       'common/auto_start_linux.cc',
14       'common/auto_start_linux.h',
15       'common/badge_util.cc',
16       'common/badge_util.h',
17       'common/child_process_logging.h',
18       'common/child_process_logging_win.cc',
19       'common/chrome_content_client.cc',
20       'common/chrome_content_client.h',
21       'common/chrome_content_client_constants.cc',
22       'common/chrome_content_client_ios.mm',
23       'common/chrome_result_codes.h',
24       'common/chrome_utility_messages.h',
25       'common/chrome_utility_printing_messages.h',
26       'common/chrome_version_info.cc',
27       'common/chrome_version_info_android.cc',
28       'common/chrome_version_info_chromeos.cc',
29       'common/chrome_version_info_posix.cc',
30       'common/chrome_version_info_mac.mm',
31       'common/chrome_version_info_win.cc',
32       'common/chrome_version_info.h',
33       'common/cloud_print/cloud_print_class_mac.h',
34       'common/cloud_print/cloud_print_class_mac.mm',
35       'common/cloud_print/cloud_print_cdd_conversion.cc',
36       'common/cloud_print/cloud_print_cdd_conversion.h',
37       'common/cloud_print/cloud_print_constants.cc',
38       'common/cloud_print/cloud_print_constants.h',
39       'common/cloud_print/cloud_print_helpers.cc',
40       'common/cloud_print/cloud_print_helpers.h',
41       'common/cloud_print/cloud_print_proxy_info.cc',
42       'common/cloud_print/cloud_print_proxy_info.h',
43       'common/common_message_generator.cc',
44       'common/common_message_generator.h',
45       'common/common_param_traits.cc',
46       'common/common_param_traits.h',
47       'common/common_param_traits_macros.h',
48       'common/content_restriction.h',
49       'common/content_settings.cc',
50       'common/content_settings.h',
51       'common/content_settings_pattern_serializer.cc',
52       'common/content_settings_pattern_serializer.h',
53       'common/crash_keys.cc',
54       'common/crash_keys.h',
55       'common/custom_handlers/protocol_handler.cc',
56       'common/custom_handlers/protocol_handler.h',
57       'common/descriptors_android.h',
58       'common/extensions/api/extension_action/action_info.cc',
59       'common/extensions/api/extension_action/action_info.h',
60       'common/extensions/api/i18n/default_locale_handler.cc',
61       'common/extensions/api/i18n/default_locale_handler.h',
62       'common/extensions/api/identity/oauth2_manifest_handler.cc',
63       'common/extensions/api/identity/oauth2_manifest_handler.h',
64       'common/extensions/api/plugins/plugins_handler.cc',
65       'common/extensions/api/plugins/plugins_handler.h',
66       'common/extensions/api/storage/storage_schema_manifest_handler.cc',
67       'common/extensions/api/storage/storage_schema_manifest_handler.h',
68       'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
69       'common/extensions/api/supervised_user_private/supervised_user_handler.h',
70       'common/extensions/chrome_extension_messages.h',
71       'common/extensions/chrome_extensions_client.cc',
72       'common/extensions/chrome_extensions_client.h',
73       'common/extensions/chrome_manifest_handlers.cc',
74       'common/extensions/chrome_manifest_handlers.h',
75       'common/extensions/chrome_utility_extensions_messages.h',
76       'common/extensions/command.cc',
77       'common/extensions/command.h',
78       'common/extensions/extension_constants.cc',
79       'common/extensions/extension_constants.h',
80       'common/extensions/extension_file_util.cc',
81       'common/extensions/extension_file_util.h',
82       'common/extensions/extension_process_policy.cc',
83       'common/extensions/extension_process_policy.h',
84       'common/extensions/features/chrome_channel_feature_filter.cc',
85       'common/extensions/features/chrome_channel_feature_filter.h',
86       'common/extensions/features/feature_channel.cc',
87       'common/extensions/features/feature_channel.h',
88       'common/extensions/image_writer/image_writer_util_mac.cc',
89       'common/extensions/image_writer/image_writer_util_mac.h',
90       'common/extensions/manifest_handlers/app_isolation_info.cc',
91       'common/extensions/manifest_handlers/app_isolation_info.h',
92       'common/extensions/manifest_handlers/app_launch_info.cc',
93       'common/extensions/manifest_handlers/app_launch_info.h',
94       'common/extensions/manifest_handlers/automation.h',
95       'common/extensions/manifest_handlers/automation.cc',
96       'common/extensions/manifest_handlers/content_scripts_handler.cc',
97       'common/extensions/manifest_handlers/content_scripts_handler.h',
98       'common/extensions/manifest_handlers/mime_types_handler.cc',
99       'common/extensions/manifest_handlers/mime_types_handler.h',
100       'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
101       'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
102       'common/extensions/manifest_handlers/settings_overrides_handler.cc',
103       'common/extensions/manifest_handlers/settings_overrides_handler.h',
104       'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
105       'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
106       'common/extensions/manifest_handlers/theme_handler.cc',
107       'common/extensions/manifest_handlers/theme_handler.h',
108       'common/extensions/manifest_handlers/ui_overrides_handler.cc',
109       'common/extensions/manifest_handlers/ui_overrides_handler.h',
110       'common/extensions/manifest_url_handler.cc',
111       'common/extensions/manifest_url_handler.h',
112       'common/extensions/permissions/chrome_api_permissions.cc',
113       'common/extensions/permissions/chrome_api_permissions.h',
114       'common/extensions/permissions/chrome_permission_message_provider.cc',
115       'common/extensions/permissions/chrome_permission_message_provider.h',
116       'common/extensions/sync_helper.cc',
117       'common/extensions/sync_helper.h',
118       'common/favicon/favicon_url_parser.cc',
119       'common/favicon/favicon_url_parser.h',
120       'common/icon_with_badge_image_source.cc',
121       'common/icon_with_badge_image_source.h',
122       'common/ini_parser.cc',
123       'common/ini_parser.h',
124       'common/instant_restricted_id_cache.h',
125       'common/instant_types.cc',
126       'common/instant_types.h',
127       'common/localized_error.cc',
128       'common/localized_error.h',
129       'common/logging_chrome.cc',
130       'common/logging_chrome.h',
131       'common/mac/app_mode_common.h',
132       'common/mac/app_mode_common.mm',
133       'common/mac/cfbundle_blocker.h',
134       'common/mac/cfbundle_blocker.mm',
135       'common/mac/launchd.h',
136       'common/mac/launchd.mm',
137       'common/mac/objc_zombie.h',
138       'common/mac/objc_zombie.mm',
139       'common/media/webrtc_logging_messages.h',
140       'common/media/webrtc_logging_message_data.cc',
141       'common/media/webrtc_logging_message_data.h',
142       'common/media_galleries/metadata_types.h',
143       'common/multi_process_lock.h',
144       'common/multi_process_lock_linux.cc',
145       'common/multi_process_lock_mac.cc',
146       'common/multi_process_lock_win.cc',
147       'common/omnibox_focus_state.h',
148       'common/partial_circular_buffer.cc',
149       'common/partial_circular_buffer.h',
150       'common/pref_names_util.cc',
151       'common/pref_names_util.h',
152       'common/prerender_types.h',
153       'common/print_messages.cc',
154       'common/print_messages.h',
155       'common/profiling.cc',
156       'common/profiling.h',
157       'common/ref_counted_util.h',
158       'common/render_messages.cc',
159       'common/render_messages.h',
160       'common/safe_browsing/safebrowsing_messages.h',
161       'common/search_provider.h',
162       'common/search_types.h',
163       'common/search_urls.cc',
164       'common/search_urls.h',
165       'common/spellcheck_common.cc',
166       'common/spellcheck_common.h',
167       'common/spellcheck_marker.h',
168       'common/spellcheck_messages.h',
169       'common/spellcheck_result.h',
170       'common/switch_utils.cc',
171       'common/switch_utils.h',
172       'common/terminate_on_heap_corruption_experiment_win.cc',
173       'common/terminate_on_heap_corruption_experiment_win.h',
174       'common/tts_messages.h',
175       'common/tts_utterance_request.cc',
176       'common/tts_utterance_request.h',
177       'common/url_constants.cc',
178       'common/url_constants.h',
179       'common/variations/experiment_labels.cc',
180       'common/variations/experiment_labels.h',
181       'common/variations/uniformity_field_trials.cc',
182       'common/variations/uniformity_field_trials.h',
183       'common/variations/variations_util.cc',
184       'common/variations/variations_util.h',
185       'common/web_application_info.cc',
186       'common/web_application_info.h',
187       'common/worker_thread_ticker.cc',
188       'common/worker_thread_ticker.h',
189     ],
190     'chrome_common_extensions_sources': [
191       'common/extensions/api/commands/commands_handler.cc',
192       'common/extensions/api/commands/commands_handler.h',
193       'common/extensions/api/extension_action/browser_action_handler.cc',
194       'common/extensions/api/extension_action/browser_action_handler.h',
195       'common/extensions/api/extension_action/page_action_handler.cc',
196       'common/extensions/api/extension_action/page_action_handler.h',
197       'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
198       'common/extensions/api/file_browser_handlers/file_browser_handler.h',
199       'common/extensions/api/input_ime/input_components_handler.cc',
200       'common/extensions/api/input_ime/input_components_handler.h',
201       'common/extensions/api/notifications/notification_style.cc',
202       'common/extensions/api/notifications/notification_style.h',
203       'common/extensions/api/omnibox/omnibox_handler.cc',
204       'common/extensions/api/omnibox/omnibox_handler.h',
205       'common/extensions/api/speech/tts_engine_manifest_handler.cc',
206       'common/extensions/api/speech/tts_engine_manifest_handler.h',
207       'common/extensions/api/spellcheck/spellcheck_handler.cc',
208       'common/extensions/api/spellcheck/spellcheck_handler.h',
209       'common/extensions/api/system_indicator/system_indicator_handler.cc',
210       'common/extensions/api/system_indicator/system_indicator_handler.h',
211       'common/extensions/api/url_handlers/url_handlers_parser.cc',
212       'common/extensions/api/url_handlers/url_handlers_parser.h',
213       'common/extensions/api/webstore/webstore_api_constants.cc',
214       'common/extensions/api/webstore/webstore_api_constants.h',
215     ],
216     'chrome_common_full_safe_browsing_sources': [
217       'common/safe_browsing/download_protection_util.cc',
218       'common/safe_browsing/download_protection_util.h',
219       'common/safe_browsing/zip_analyzer.cc',
220       'common/safe_browsing/zip_analyzer.h',
221     ],
222     'chrome_common_importer_sources': [
223       'common/importer/firefox_importer_utils.cc',
224       'common/importer/firefox_importer_utils.h',
225       'common/importer/firefox_importer_utils_linux.cc',
226       'common/importer/firefox_importer_utils_mac.mm',
227       'common/importer/firefox_importer_utils_win.cc',
228       'common/importer/ie_importer_test_registry_overrider_win.cc',
229       'common/importer/ie_importer_test_registry_overrider_win.h',
230       'common/importer/ie_importer_utils_win.cc',
231       'common/importer/ie_importer_utils_win.h',
232       'common/importer/imported_bookmark_entry.cc',
233       'common/importer/imported_bookmark_entry.h',
234       'common/importer/imported_favicon_usage.cc',
235       'common/importer/imported_favicon_usage.h',
236       'common/importer/importer_autofill_form_data_entry.cc',
237       'common/importer/importer_autofill_form_data_entry.h',
238       'common/importer/importer_bridge.cc',
239       'common/importer/importer_bridge.h',
240       'common/importer/importer_data_types.cc',
241       'common/importer/importer_data_types.h',
242       'common/importer/importer_type.h',
243       'common/importer/importer_url_row.cc',
244       'common/importer/importer_url_row.h',
245       'common/importer/profile_import_process_messages.cc',
246       'common/importer/profile_import_process_messages.h',
247       'common/importer/safari_importer_utils.h',
248       'common/importer/safari_importer_utils.mm',
249     ],
250     'chrome_common_service_process_sources': [
251       'common/service_messages.h',
252       'common/service_process_util.cc',
253       'common/service_process_util.h',
254       'common/service_process_util_linux.cc',
255       'common/service_process_util_mac.mm',
256       'common/service_process_util_posix.cc',
257       'common/service_process_util_posix.h',
258       'common/service_process_util_win.cc',
259     ],
260     'chrome_common_win_mac_sources': [
261       'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
262       'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
263       'common/extensions/api/networking_private/networking_private_crypto.cc',
264       'common/extensions/api/networking_private/networking_private_crypto.h',
265       'common/media_galleries/itunes_library.cc',
266       'common/media_galleries/itunes_library.h',
267       'common/media_galleries/picasa_types.cc',
268       'common/media_galleries/picasa_types.h',
269       'common/media_galleries/pmp_constants.h',
270     ],
271     'chrome_common_mac_sources': [
272       'common/media_galleries/iphoto_library.cc',
273       'common/media_galleries/iphoto_library.h',
274     ]
275   },
276   'targets': [
277     {
278       'target_name': 'common',
279       'type': 'static_library',
280       'variables': {
281         'chrome_common_target': 1,
282         'enable_wexit_time_destructors': 1,
283       },
284       'include_dirs': [
285           '..',
286           '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_content_client.cc.
287         ],
288       'direct_dependent_settings': {
289         'include_dirs': [
290           '..',
291         ],
292       },
293       'dependencies': [
294         # TODO(gregoryd): chrome_resources and chrome_strings could be
295         #  shared with the 64-bit target, but it does not work due to a gyp
296         # issue.
297         'common_net',
298         'common_version',
299         'installer_util',
300         'safe_browsing_proto',
301         '<(DEPTH)/base/base.gyp:base',
302         '<(DEPTH)/base/base.gyp:base_i18n',
303         '<(DEPTH)/base/base.gyp:base_prefs',
304         '<(DEPTH)/base/base.gyp:base_static',
305         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
306         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
307         '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
308         '<(DEPTH)/chrome/common_constants.gyp:common_constants',
309         '<(DEPTH)/components/components.gyp:cloud_devices_common',
310         '<(DEPTH)/components/components.gyp:component_updater',
311         '<(DEPTH)/components/components.gyp:content_settings_core_common',
312         '<(DEPTH)/components/components.gyp:json_schema',
313         '<(DEPTH)/components/components.gyp:metrics',
314         '<(DEPTH)/components/components.gyp:policy_component_common',
315         '<(DEPTH)/components/components.gyp:translate_core_common',
316         '<(DEPTH)/components/components.gyp:variations',
317         '<(DEPTH)/content/content.gyp:content_common',
318         '<(DEPTH)/crypto/crypto.gyp:crypto',
319         '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
320         '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
321         '<(DEPTH)/media/cast/cast.gyp:cast_net',
322         '<(DEPTH)/net/net.gyp:net',
323         '<(DEPTH)/skia/skia.gyp:skia',
324         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
325         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
326         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
327         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
328         '<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
329         '<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
330         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
331         '<(DEPTH)/url/url.gyp:url_lib',
332       ],
333       'sources': [
334         '<@(chrome_common_sources)'
335       ],
336       'conditions': [
337         ['enable_extensions==1', {
338           'sources': [ '<@(chrome_common_extensions_sources)' ],
339           'dependencies': [
340             '../device/usb/usb.gyp:device_usb',
341           ],
342         }],
343         ['OS=="win" or OS=="mac"', {
344           'sources': [ '<@(chrome_common_win_mac_sources)' ],
345         }],
346         ['(OS=="win" or OS=="mac") and use_openssl==1', {
347           # networking_private_crypto_openssl.cc depends on boringssl.
348           'dependencies': [
349             '../third_party/boringssl/boringssl.gyp:boringssl',
350           ],
351         }],
352         ['OS=="mac"', {
353           'sources': [ '<@(chrome_common_mac_sources)' ],
354         }],
355         ['OS != "ios"', {
356           'dependencies': [
357             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
358             '<(DEPTH)/components/components.gyp:autofill_core_common',
359             '<(DEPTH)/components/components.gyp:autofill_content_common',
360             '<(DEPTH)/components/components.gyp:password_manager_core_common',
361             '<(DEPTH)/components/components.gyp:password_manager_content_common',
362             '<(DEPTH)/components/components.gyp:signin_core_common',
363             '<(DEPTH)/components/components.gyp:translate_content_common',
364             '<(DEPTH)/components/components.gyp:visitedlink_common',
365             '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
366             '<(DEPTH)/extensions/extensions.gyp:extensions_common',
367             '<(DEPTH)/ipc/ipc.gyp:ipc',
368             '<(DEPTH)/third_party/re2/re2.gyp:re2',
369             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
370           ],
371           'export_dependent_settings': [
372             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
373           ],
374         }, {  # OS == ios
375           'sources/': [
376             ['exclude', '^common/child_process_'],
377             ['exclude', '^common/chrome_content_client\\.cc$'],
378             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
379             ['exclude', '^common/common_message_generator\\.cc$'],
380             ['exclude', '^common/common_param_traits'],
381             ['exclude', '^common/custom_handlers/'],
382             ['exclude', '^common/extensions/'],
383             ['exclude', '^common/logging_chrome\\.'],
384             ['exclude', '^common/media_galleries/'],
385             ['exclude', '^common/multi_process_'],
386             ['exclude', '^common/profiling\\.'],
387             ['exclude', '^common/spellcheck_'],
388             ['exclude', '^common/validation_message_'],
389             ['exclude', '^common/web_apps\\.'],
390             # TODO(ios): Include files here as they are made to work; once
391             # everything is online, remove everything below here and just
392             # use the exclusions above.
393             ['exclude', '\\.(cc|mm)$'],
394             ['include', '_ios\\.(cc|mm)$'],
395             ['include', '(^|/)ios/'],
396             ['include', '^common/chrome_version_info\\.cc$'],
397             ['include', '^common/translate'],
398             ['include', '^common/zip'],
399           ],
400           'include_dirs': [
401             '<(DEPTH)/breakpad/src',
402           ],
403         }],
404         ['disable_nacl==0', {
405           'dependencies': [
406             '<(DEPTH)/components/nacl.gyp:nacl_common',
407             '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
408           ],
409         }],
410         ['enable_plugins==1', {
411           'dependencies': [
412             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
413           ],
414           'sources': [
415             'common/pepper_flash.cc',
416             'common/pepper_flash.h',
417             'common/pepper_permission_util.cc',
418             'common/pepper_permission_util.h',
419           ],
420         }],
421         ['enable_printing==0', {
422           'sources!': [
423             'common/print_messages.cc',
424             'common/print_messages.h',
425           ]
426         }, {
427           'dependencies': [
428             '<(DEPTH)/printing/printing.gyp:printing',
429           ],
430         }],
431         ['enable_printing==1', {
432           'sources': [ '<@(chrome_common_service_process_sources)' ],
433         }],
434         ['enable_service_discovery==1', {
435           'sources' : [
436             'common/local_discovery/service_discovery_client.cc',
437             'common/local_discovery/service_discovery_client.h',
438            ]
439         }],
440         ['enable_mdns==1', {
441           'sources' : [
442             'common/local_discovery/service_discovery_client_impl.cc',
443             'common/local_discovery/service_discovery_client_impl.h',
444           ]
445         }],
446         ['OS=="android"', {
447           'sources!': [
448             'common/badge_util.cc',
449             'common/chrome_version_info_posix.cc',
450             'common/extensions/api/extension_action/browser_action_handler.cc',
451             'common/extensions/api/extension_action/page_action_handler.cc',
452             'common/extensions/api/spellcheck/spellcheck_handler.cc',
453             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
454             'common/icon_with_badge_image_source.cc',
455             'common/media_galleries/metadata_types.h',
456             'common/net/url_util.cc',
457             'common/spellcheck_common.cc',
458           ],
459         }, {
460           # Non-Android.
461           'sources': [ '<@(chrome_common_importer_sources)' ]
462         }],
463         ['OS=="win"', {
464           'include_dirs': [
465             '<(DEPTH)/breakpad/src',
466             '<(DEPTH)/third_party/wtl/include',
467           ],
468           'dependencies': [
469             '<(DEPTH)/components/components.gyp:dom_distiller_core',  # Needed by chrome_content_client.cc.
470           ],
471         }],
472         ['enable_mdns == 1', {
473             'sources': [
474               'common/local_discovery/local_discovery_messages.h',
475             ]
476         }],
477         ['chromeos==1', {
478           'sources!': [
479             'common/chrome_version_info_linux.cc',
480           ],
481         }],
482         ['OS=="mac"', {
483           'dependencies': [
484             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
485             '../third_party/mach_override/mach_override.gyp:mach_override',
486           ],
487           'include_dirs': [
488             '<(DEPTH)/breakpad/src',
489           ],
490           'sources!': [
491             'common/chrome_version_info_posix.cc',
492           ],
493         }],
494         ['remoting==1', {
495           'dependencies': [
496             '../remoting/remoting.gyp:remoting_client_plugin',
497           ],
498         }],
499         ['enable_webrtc==0', {
500           'sources!': [
501             'common/media/webrtc_logging_messages.h',
502           ]
503         }],
504         ['configuration_policy==1', {
505           'dependencies': [
506             '<(DEPTH)/components/components.gyp:policy',
507           ],
508         }],
509         ['safe_browsing==1', {
510           'defines': [ 'FULL_SAFE_BROWSING' ],
511           'sources': [ '<@(chrome_common_full_safe_browsing_sources)', ],
512         }],
513         ['safe_browsing==2', {
514           'defines': [ 'MOBILE_SAFE_BROWSING' ],
515         }],
516         ['use_openssl==1', {
517            'sources!': [
518              'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
519            ],
520          },
521          {  # else !use_openssl
522            'sources!': [
523              'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
524            ],
525          },
526         ],
527       ],
528       'target_conditions': [
529         ['OS == "ios"', {
530           'sources/': [
531             # Pull in specific Mac files for iOS (which have been filtered out
532             # by file name rules).
533             ['include', '^common/chrome_version_info_mac\\.mm$'],
534           ],
535         }],
536       ],
537       'export_dependent_settings': [
538         '../base/base.gyp:base',
539       ],
540     },
541     {
542       # GN version: //chrome/common:version
543       'target_name': 'common_version',
544       'type': 'none',
545       'conditions': [
546         ['os_posix == 1 and OS != "mac" and OS != "ios"', {
547           'direct_dependent_settings': {
548             'include_dirs': [
549               '<(SHARED_INTERMEDIATE_DIR)',
550             ],
551           },
552           # Because posix_version generates a header, we must set the
553           # hard_dependency flag.
554           'hard_dependency': 1,
555           'actions': [
556             {
557               'action_name': 'posix_version',
558               'variables': {
559                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
560                 'version_py_path': '<(DEPTH)/build/util/version.py',
561                 'version_path': 'VERSION',
562                 'template_input_path': 'common/chrome_version_info_posix.h.version',
563               },
564               'conditions': [
565                 [ 'branding == "Chrome"', {
566                   'variables': {
567                      'branding_path':
568                        'app/theme/google_chrome/BRANDING',
569                   },
570                 }, { # else branding!="Chrome"
571                   'variables': {
572                      'branding_path':
573                        'app/theme/chromium/BRANDING',
574                   },
575                 }],
576               ],
577               'inputs': [
578                 '<(template_input_path)',
579                 '<(version_path)',
580                 '<(branding_path)',
581                 '<(lastchange_path)',
582               ],
583               'outputs': [
584                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
585               ],
586               'action': [
587                 'python',
588                 '<(version_py_path)',
589                 '-f', '<(version_path)',
590                 '-f', '<(branding_path)',
591                 '-f', '<(lastchange_path)',
592                 '<(template_input_path)',
593                 '<@(_outputs)',
594               ],
595               'message': 'Generating version information',
596             },
597           ],
598         }],
599       ],
600     },
601     {
602       # GN version: //chrome/common/net
603       'target_name': 'common_net',
604       'type': 'static_library',
605       'sources': [
606         'common/net/net_error_info.cc',
607         'common/net/net_error_info.h',
608         'common/net/net_resource_provider.cc',
609         'common/net/net_resource_provider.h',
610         'common/net/predictor_common.h',
611         'common/net/url_util.cc',
612         'common/net/url_util.h',
613         'common/net/x509_certificate_model.cc',
614         'common/net/x509_certificate_model_nss.cc',
615         'common/net/x509_certificate_model_openssl.cc',
616         'common/net/x509_certificate_model.h',
617       ],
618       'dependencies': [
619         '<(DEPTH)/base/base.gyp:base',
620         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
621         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
622         '<(DEPTH)/crypto/crypto.gyp:crypto',
623         '<(DEPTH)/net/net.gyp:net_resources',
624         '<(DEPTH)/net/net.gyp:net',
625         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
626         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
627       ],
628       'conditions': [
629         ['OS != "ios"', {
630           'dependencies': [
631             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
632           ],
633         }, {  # OS == ios
634           'sources!': [
635             'common/net/net_resource_provider.cc',
636             'common/net/x509_certificate_model.cc',
637           ],
638         }],
639         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
640             'dependencies': [
641               '../build/linux/system.gyp:ssl',
642             ],
643           },
644         ],
645         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
646             'sources!': [
647               'common/net/x509_certificate_model_nss.cc',
648               'common/net/x509_certificate_model_openssl.cc',
649             ],
650           },
651         ],
652         ['OS == "android"', {
653             'dependencies': [
654               '../third_party/boringssl/boringssl.gyp:boringssl',
655             ],
656             'sources!': [
657               'common/net/x509_certificate_model.cc',
658               'common/net/x509_certificate_model_openssl.cc',
659             ],
660         }],
661         ['use_openssl==1', {
662             'sources!': [
663               'common/net/x509_certificate_model_nss.cc',
664             ],
665             'dependencies': [
666               '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
667             ],
668           },
669           {  # else !use_openssl: remove the unneeded files
670             'sources!': [
671               'common/net/x509_certificate_model_openssl.cc',
672             ],
673           },
674         ],
675         ['OS=="win"', {
676             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
677             'msvs_disabled_warnings': [4267, ],
678           },
679         ],
680       ],
681     },
682     {
683       # Protobuf compiler / generator for the safebrowsing client
684       # model proto and the client-side detection (csd) request
685       # protocol buffer.
687       # GN version: //chrome/common/safe_browsing:proto
688       'target_name': 'safe_browsing_proto',
689       'type': 'static_library',
690       'sources': [
691         'common/safe_browsing/client_model.proto',
692         'common/safe_browsing/crx_info.proto',
693         'common/safe_browsing/csd.proto'
694       ],
695       'variables': {
696         'proto_in_dir': 'common/safe_browsing',
697         'proto_out_dir': 'chrome/common/safe_browsing',
698       },
699       'includes': [ '../build/protoc.gypi' ],
700     },
701   ],