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