Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / chrome_common.gypi
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6   'targets': [
7     {
8       '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/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_extensions_client.cc',
164         'common/extensions/chrome_extensions_client.h',
165         'common/extensions/chrome_manifest_handlers.cc',
166         'common/extensions/chrome_manifest_handlers.h',
167         'common/extensions/command.cc',
168         'common/extensions/command.h',
169         'common/extensions/dom_action_types.h',
170         'common/extensions/extension_constants.cc',
171         'common/extensions/extension_constants.h',
172         'common/extensions/extension_file_util.cc',
173         'common/extensions/extension_file_util.h',
174         'common/extensions/extension_icon_set.cc',
175         'common/extensions/extension_icon_set.h',
176         'common/extensions/extension_l10n_util.cc',
177         'common/extensions/extension_l10n_util.h',
178         'common/extensions/extension_messages.cc',
179         'common/extensions/extension_messages.h',
180         'common/extensions/extension_process_policy.cc',
181         'common/extensions/extension_process_policy.h',
182         'common/extensions/features/api_feature.cc',
183         'common/extensions/features/api_feature.h',
184         'common/extensions/features/base_feature_provider.cc',
185         'common/extensions/features/base_feature_provider.h',
186         'common/extensions/features/complex_feature.cc',
187         'common/extensions/features/complex_feature.h',
188         'common/extensions/features/feature_channel.cc',
189         'common/extensions/features/feature_channel.h',
190         'common/extensions/features/manifest_feature.cc',
191         'common/extensions/features/manifest_feature.h',
192         'common/extensions/features/permission_feature.cc',
193         'common/extensions/features/permission_feature.h',
194         'common/extensions/features/simple_feature.cc',
195         'common/extensions/features/simple_feature.h',
196         'common/extensions/manifest_handler_helpers.cc',
197         'common/extensions/manifest_handler_helpers.h',
198         'common/extensions/manifest_handlers/app_isolation_info.cc',
199         'common/extensions/manifest_handlers/app_isolation_info.h',
200         'common/extensions/manifest_handlers/app_launch_info.cc',
201         'common/extensions/manifest_handlers/app_launch_info.h',
202         'common/extensions/manifest_handlers/content_scripts_handler.cc',
203         'common/extensions/manifest_handlers/content_scripts_handler.h',
204         'common/extensions/manifest_handlers/externally_connectable.cc',
205         'common/extensions/manifest_handlers/externally_connectable.h',
206         'common/extensions/manifest_handlers/icons_handler.cc',
207         'common/extensions/manifest_handlers/icons_handler.h',
208         'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
209         'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
210         'common/extensions/manifest_handlers/nacl_modules_handler.cc',
211         'common/extensions/manifest_handlers/nacl_modules_handler.h',
212         'common/extensions/manifest_handlers/settings_overrides_handler.cc',
213         'common/extensions/manifest_handlers/settings_overrides_handler.h',
214         'common/extensions/manifest_handlers/theme_handler.cc',
215         'common/extensions/manifest_handlers/theme_handler.h',
216         'common/extensions/manifest_url_handler.cc',
217         'common/extensions/manifest_url_handler.h',
218         'common/extensions/message_bundle.cc',
219         'common/extensions/message_bundle.h',
220         'common/extensions/mime_types_handler.cc',
221         'common/extensions/mime_types_handler.h',
222         'common/extensions/permissions/chrome_api_permissions.cc',
223         'common/extensions/permissions/chrome_api_permissions.h',
224         'common/extensions/permissions/chrome_permission_message_provider.cc',
225         'common/extensions/permissions/chrome_permission_message_provider.h',
226         'common/extensions/permissions/media_galleries_permission.cc',
227         'common/extensions/permissions/media_galleries_permission.h',
228         'common/extensions/permissions/media_galleries_permission_data.cc',
229         'common/extensions/permissions/media_galleries_permission_data.h',
230         'common/extensions/permissions/permission_message_util.cc',
231         'common/extensions/permissions/permission_message_util.h',
232         'common/extensions/permissions/set_disjunction_permission.h',
233         'common/extensions/permissions/settings_override_permission.cc',
234         'common/extensions/permissions/settings_override_permission.h',
235         'common/extensions/permissions/socket_permission.cc',
236         'common/extensions/permissions/socket_permission.h',
237         'common/extensions/permissions/socket_permission_data.cc',
238         'common/extensions/permissions/socket_permission_data.h',
239         'common/extensions/permissions/socket_permission_entry.cc',
240         'common/extensions/permissions/socket_permission_entry.h',
241         'common/extensions/permissions/usb_device_permission.cc',
242         'common/extensions/permissions/usb_device_permission.h',
243         'common/extensions/permissions/usb_device_permission_data.cc',
244         'common/extensions/permissions/usb_device_permission_data.h',
245         'common/extensions/sync_helper.cc',
246         'common/extensions/sync_helper.h',
247         'common/extensions/update_manifest.cc',
248         'common/extensions/update_manifest.h',
249         'common/extensions/value_counter.cc',
250         'common/extensions/value_counter.h',
251         'common/favicon/favicon_types.cc',
252         'common/favicon/favicon_types.h',
253         'common/favicon/favicon_url_parser.cc',
254         'common/favicon/favicon_url_parser.h',
255         'common/profile_management_switches.cc',
256         'common/profile_management_switches.h',
257         'common/icon_with_badge_image_source.cc',
258         'common/icon_with_badge_image_source.h',
259         'common/importer/firefox_importer_utils.cc',
260         'common/importer/firefox_importer_utils.h',
261         'common/importer/firefox_importer_utils_linux.cc',
262         'common/importer/firefox_importer_utils_mac.mm',
263         'common/importer/firefox_importer_utils_win.cc',
264         'common/importer/ie_importer_test_registry_overrider_win.cc',
265         'common/importer/ie_importer_test_registry_overrider_win.h',
266         'common/importer/ie_importer_utils_win.cc',
267         'common/importer/ie_importer_utils_win.h',
268         'common/importer/imported_bookmark_entry.cc',
269         'common/importer/imported_bookmark_entry.h',
270         'common/importer/imported_favicon_usage.cc',
271         'common/importer/imported_favicon_usage.h',
272         'common/importer/importer_bridge.cc',
273         'common/importer/importer_bridge.h',
274         'common/importer/importer_data_types.cc',
275         'common/importer/importer_data_types.h',
276         'common/importer/importer_type.h',
277         'common/importer/importer_url_row.cc',
278         'common/importer/importer_url_row.h',
279         'common/importer/profile_import_process_messages.cc',
280         'common/importer/profile_import_process_messages.h',
281         'common/importer/safari_importer_utils.h',
282         'common/importer/safari_importer_utils.mm',
283         'common/instant_restricted_id_cache.h',
284         'common/instant_types.cc',
285         'common/instant_types.h',
286         'common/localized_error.cc',
287         'common/localized_error.h',
288         'common/local_discovery/service_discovery_client.cc',
289         'common/local_discovery/service_discovery_client.h',
290         'common/logging_chrome.cc',
291         'common/logging_chrome.h',
292         'common/mac/app_mode_common.h',
293         'common/mac/app_mode_common.mm',
294         'common/mac/cfbundle_blocker.h',
295         'common/mac/cfbundle_blocker.mm',
296         'common/mac/launchd.h',
297         'common/mac/launchd.mm',
298         'common/mac/objc_method_swizzle.h',
299         'common/mac/objc_method_swizzle.mm',
300         'common/mac/objc_zombie.h',
301         'common/mac/objc_zombie.mm',
302         'common/media/webrtc_logging_messages.h',
303         'common/metrics/caching_permuted_entropy_provider.cc',
304         'common/metrics/caching_permuted_entropy_provider.h',
305         'common/metrics/metrics_log_base.cc',
306         'common/metrics/metrics_log_base.h',
307         'common/metrics/metrics_log_manager.cc',
308         'common/metrics/metrics_log_manager.h',
309         'common/metrics/metrics_service_base.cc',
310         'common/metrics/metrics_service_base.h',
311         'common/metrics/variations/experiment_labels.cc',
312         'common/metrics/variations/experiment_labels.h',
313         'common/metrics/variations/uniformity_field_trials.cc',
314         'common/metrics/variations/uniformity_field_trials.h',
315         'common/metrics/variations/variations_util.cc',
316         'common/metrics/variations/variations_util.h',
317         'common/multi_process_lock.h',
318         'common/multi_process_lock_linux.cc',
319         'common/multi_process_lock_mac.cc',
320         'common/multi_process_lock_win.cc',
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/prerender_types.h',
331         'common/print_messages.cc',
332         'common/print_messages.h',
333         'common/profiling.cc',
334         'common/profiling.h',
335         'common/ref_counted_util.h',
336         'common/render_messages.cc',
337         'common/render_messages.h',
338         'common/safe_browsing/download_protection_util.cc',
339         'common/safe_browsing/download_protection_util.h',
340         'common/safe_browsing/safebrowsing_messages.h',
341         'common/safe_browsing/zip_analyzer.cc',
342         'common/safe_browsing/zip_analyzer.h',
343         'common/search_provider.h',
344         'common/search_types.h',
345         'common/search_urls.cc',
346         'common/search_urls.h',
347         'common/service_messages.h',
348         'common/service_process_util.cc',
349         'common/service_process_util.h',
350         'common/service_process_util_linux.cc',
351         'common/service_process_util_mac.mm',
352         'common/service_process_util_posix.cc',
353         'common/service_process_util_posix.h',
354         'common/service_process_util_win.cc',
355         'common/spellcheck_common.cc',
356         'common/spellcheck_common.h',
357         'common/spellcheck_marker.h',
358         'common/spellcheck_messages.h',
359         'common/spellcheck_result.h',
360         'common/switch_utils.cc',
361         'common/switch_utils.h',
362         'common/thumbnail_score.cc',
363         'common/thumbnail_score.h',
364         'common/tts_messages.h',
365         'common/tts_utterance_request.cc',
366         'common/tts_utterance_request.h',
367         'common/url_constants.cc',
368         'common/url_constants.h',
369         'common/web_application_info.cc',
370         'common/web_application_info.h',
371         'common/worker_thread_ticker.cc',
372         'common/worker_thread_ticker.h',
373       ],
374       'conditions': [
375         ['enable_extensions==1', {
376           'dependencies': [
377             '../device/bluetooth/bluetooth.gyp:device_bluetooth',
378             '../device/usb/usb.gyp:device_usb',
379           ],
380         }, {  # enable_extensions == 0
381           'sources/': [
382             ['exclude', '^common/extensions/api/'],
383             ['include', 'common/extensions/api/extension_action/action_info.cc'],
384             ['include', 'common/extensions/api/extension_action/action_info.h'],
385             ['include', 'common/extensions/api/i18n/default_locale_handler.cc'],
386             ['include', 'common/extensions/api/i18n/default_locale_handler.h'],
387             ['include', 'common/extensions/api/identity/oauth2_manifest_handler.cc'],
388             ['include', 'common/extensions/api/identity/oauth2_manifest_handler.h'],
389             ['include', 'common/extensions/api/managed_mode_private/managed_mode_handler.cc'],
390             ['include', 'common/extensions/api/managed_mode_private/managed_mode_handler.h'],
391             ['include', 'common/extensions/api/plugins/plugins_handler.cc'],
392             ['include', 'common/extensions/api/plugins/plugins_handler.h'],
393             ['include', 'common/extensions/api/storage/storage_schema_manifest_handler.cc'],
394             ['include', 'common/extensions/api/storage/storage_schema_manifest_handler.h'],
395           ],
396         }],
397         ['OS=="win" or OS=="mac"', {
398           'sources': [
399             'common/media_galleries/itunes_library.cc',
400             'common/media_galleries/itunes_library.h',
401             'common/media_galleries/picasa_types.cc',
402             'common/media_galleries/picasa_types.h',
403             'common/media_galleries/pmp_constants.h',
404           ],
405         }],
406         ['OS=="mac"', {
407           'sources': [
408             'common/media_galleries/iphoto_library.cc',
409             'common/media_galleries/iphoto_library.h',
410           ],
411         }],
412         ['OS != "ios"', {
413           'dependencies': [
414             '<(DEPTH)/third_party/re2/re2.gyp:re2',
415             '<(DEPTH)/chrome/common/extensions/api/api.gyp:api',
416             '<(DEPTH)/components/components.gyp:autofill_core_common',
417             '<(DEPTH)/components/components.gyp:autofill_content_common',
418             '<(DEPTH)/components/components.gyp:password_manager_core_common',
419             '<(DEPTH)/components/nacl.gyp:nacl_common',
420             '<(DEPTH)/components/components.gyp:visitedlink_common',
421             '<(DEPTH)/extensions/extensions.gyp:extensions_common',
422             '<(DEPTH)/ipc/ipc.gyp:ipc',
423             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
424             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
425           ],
426         }, {  # OS == ios
427           'sources/': [
428             ['exclude', '^common/child_process_'],
429             ['exclude', '^common/chrome_content_client\\.cc$'],
430             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
431             ['exclude', '^common/common_message_generator\\.cc$'],
432             ['exclude', '^common/common_param_traits'],
433             ['exclude', '^common/custom_handlers/'],
434             ['exclude', '^common/extensions/'],
435             ['exclude', '^common/logging_chrome\\.'],
436             ['exclude', '^common/multi_process_'],
437             ['exclude', '^common/nacl_'],
438             ['exclude', '^common/pepper_flash\\.'],
439             ['exclude', '^common/profiling\\.'],
440             ['exclude', '^common/service_process_util_'],
441             ['exclude', '^common/spellcheck_'],
442             ['exclude', '^common/validation_message_'],
443             ['exclude', '^common/web_apps\\.'],
444             # TODO(ios): Include files here as they are made to work; once
445             # everything is online, remove everything below here and just
446             # use the exclusions above.
447             ['exclude', '\\.(cc|mm)$'],
448             ['include', '_ios\\.(cc|mm)$'],
449             ['include', '(^|/)ios/'],
450             ['include', '^common/chrome_version_info\\.cc$'],
451             ['include', '^common/translate'],
452             ['include', '^common/zip'],
453           ],
454           'include_dirs': [
455             '<(DEPTH)/breakpad/src',
456           ],
457         }],
458         ['enable_printing!=0', {
459           'dependencies': [
460             '<(DEPTH)/printing/printing.gyp:printing',
461           ],
462         }],
463         ['OS=="android"', {
464           'sources/': [
465             ['exclude', '^common/chrome_version_info_posix.cc'],
466             ['exclude', '^common/service_'],
467           ],
468           'sources!': [
469             'common/badge_util.cc',
470             'common/extensions/api/extension_action/browser_action_handler.cc',
471             'common/extensions/api/extension_action/page_action_handler.cc',
472             'common/extensions/api/spellcheck/spellcheck_handler.cc',
473             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
474             'common/extensions/manifest_handlers/nacl_modules_handler.cc',
475             'common/icon_with_badge_image_source.cc',
476             'common/importer/imported_bookmark_entry.cc',
477             'common/importer/importer_bridge.cc',
478             'common/importer/importer_data_types.cc',
479             'common/importer/importer_url_row.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':
588                   '<(DEPTH)/build/util/LASTCHANGE',
589                 'version_py_path': 'tools/build/version.py',
590                 'version_path': 'VERSION',
591                 'template_input_path': 'common/chrome_version_info_posix.h.version',
592               },
593               'conditions': [
594                 [ 'branding == "Chrome"', {
595                   'variables': {
596                      'branding_path':
597                        'app/theme/google_chrome/BRANDING',
598                   },
599                 }, { # else branding!="Chrome"
600                   'variables': {
601                      'branding_path':
602                        'app/theme/chromium/BRANDING',
603                   },
604                 }],
605               ],
606               'inputs': [
607                 '<(template_input_path)',
608                 '<(version_path)',
609                 '<(branding_path)',
610                 '<(lastchange_path)',
611               ],
612               'outputs': [
613                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
614               ],
615               'action': [
616                 'python',
617                 '<(version_py_path)',
618                 '-f', '<(version_path)',
619                 '-f', '<(branding_path)',
620                 '-f', '<(lastchange_path)',
621                 '<(template_input_path)',
622                 '<@(_outputs)',
623               ],
624               'message': 'Generating version information',
625             },
626           ],
627         }],
628       ],
629     },
630     {
631       'target_name': 'common_net',
632       'type': 'static_library',
633       'sources': [
634         'common/net/net_error_info.cc',
635         'common/net/net_error_info.h',
636         'common/net/net_resource_provider.cc',
637         'common/net/net_resource_provider.h',
638         'common/net/predictor_common.h',
639         'common/net/url_fixer_upper.cc',
640         'common/net/url_fixer_upper.h',
641         'common/net/url_util.cc',
642         'common/net/url_util.h',
643         'common/net/x509_certificate_model.cc',
644         'common/net/x509_certificate_model_nss.cc',
645         'common/net/x509_certificate_model_openssl.cc',
646         'common/net/x509_certificate_model.h',
647       ],
648       'dependencies': [
649         '<(DEPTH)/base/base.gyp:base',
650         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
651         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
652         '<(DEPTH)/crypto/crypto.gyp:crypto',
653         '<(DEPTH)/net/net.gyp:net_resources',
654         '<(DEPTH)/net/net.gyp:net',
655         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
656         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
657       ],
658       'conditions': [
659         ['OS != "ios"', {
660           'dependencies': [
661             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
662           ],
663         }, {  # OS == ios
664           'sources!': [
665             'common/net/net_resource_provider.cc',
666             'common/net/x509_certificate_model.cc',
667           ],
668         }],
669         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
670             'dependencies': [
671               '../build/linux/system.gyp:ssl',
672             ],
673           },
674         ],
675         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
676             'sources!': [
677               'common/net/x509_certificate_model_nss.cc',
678               'common/net/x509_certificate_model_openssl.cc',
679             ],
680           },
681         ],
682         ['OS == "android"', {
683             'dependencies': [
684               '../third_party/openssl/openssl.gyp:openssl',
685             ],
686             'sources!': [
687               'common/net/x509_certificate_model.cc',
688             ],
689         }],
690         ['use_openssl==1', {
691             'sources!': [
692               'common/net/x509_certificate_model_nss.cc',
693             ],
694           },
695           {  # else !use_openssl: remove the unneeded files
696             'sources!': [
697               'common/net/x509_certificate_model_openssl.cc',
698             ],
699           },
700         ],
701         ['OS=="win"', {
702             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
703             'msvs_disabled_warnings': [4267, ],
704           },
705         ],
706       ],
707     },
708     {
709       # Protobuf compiler / generator for the safebrowsing client
710       # model proto and the client-side detection (csd) request
711       # protocol buffer.
712       'target_name': 'safe_browsing_proto',
713       'type': 'static_library',
714       'sources': [
715         'common/safe_browsing/client_model.proto',
716         'common/safe_browsing/crx_info.proto',
717         'common/safe_browsing/csd.proto'
718       ],
719       'variables': {
720         'proto_in_dir': 'common/safe_browsing',
721         'proto_out_dir': 'chrome/common/safe_browsing',
722       },
723       'includes': [ '../build/protoc.gypi' ],
724     },
725     {
726       # Protobuf compiler / generator for UMA (User Metrics Analysis).
727       'target_name': 'metrics_proto',
728       'type': 'static_library',
729       'sources': [
730         'common/metrics/proto/chrome_experiments.proto',
731         'common/metrics/proto/chrome_user_metrics_extension.proto',
732         'common/metrics/proto/histogram_event.proto',
733         'common/metrics/proto/omnibox_event.proto',
734         'common/metrics/proto/perf_data.proto',
735         'common/metrics/proto/permuted_entropy_cache.proto',
736         'common/metrics/proto/profiler_event.proto',
737         'common/metrics/proto/system_profile.proto',
738         'common/metrics/proto/user_action_event.proto',
739       ],
740       'variables': {
741         'proto_in_dir': 'common/metrics/proto',
742         'proto_out_dir': 'chrome/common/metrics/proto',
743       },
744       'includes': [ '../build/protoc.gypi' ],
745     },
746   ],
747 }