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