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