9779e145c8c60deb5bee582443390e32e418aed3
[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/cancelable_task_tracker.cc',
71         'common/cancelable_task_tracker.h',
72         'common/child_process_logging.h',
73         'common/child_process_logging_win.cc',
74         'common/chrome_content_client.cc',
75         'common/chrome_content_client.h',
76         'common/chrome_content_client_constants.cc',
77         'common/chrome_content_client_ios.mm',
78         'common/chrome_result_codes.h',
79         'common/chrome_utility_messages.h',
80         'common/chrome_version_info.cc',
81         'common/chrome_version_info_android.cc',
82         'common/chrome_version_info_chromeos.cc',
83         'common/chrome_version_info_posix.cc',
84         'common/chrome_version_info_mac.mm',
85         'common/chrome_version_info_win.cc',
86         'common/chrome_version_info.h',
87         'common/cloud_print/cloud_print_class_mac.h',
88         'common/cloud_print/cloud_print_class_mac.mm',
89         'common/cloud_print/cloud_print_constants.cc',
90         'common/cloud_print/cloud_print_constants.h',
91         'common/cloud_print/cloud_print_helpers.cc',
92         'common/cloud_print/cloud_print_helpers.h',
93         'common/cloud_print/cloud_print_proxy_info.cc',
94         'common/cloud_print/cloud_print_proxy_info.h',
95         'common/common_message_generator.cc',
96         'common/common_message_generator.h',
97         'common/common_param_traits.cc',
98         'common/common_param_traits.h',
99         'common/common_param_traits_macros.h',
100         'common/content_restriction.h',
101         'common/content_settings.cc',
102         'common/content_settings.h',
103         'common/content_settings_helper.cc',
104         'common/content_settings_helper.h',
105         'common/content_settings_pattern.cc',
106         'common/content_settings_pattern.h',
107         'common/content_settings_pattern_parser.cc',
108         'common/content_settings_pattern_parser.h',
109         'common/content_settings_types.h',
110         'common/crash_keys.cc',
111         'common/crash_keys.h',
112         'common/custom_handlers/protocol_handler.cc',
113         'common/custom_handlers/protocol_handler.h',
114         'common/descriptors_android.h',
115         'common/encrypted_media_messages_android.h',
116         'common/extensions/api/commands/commands_handler.cc',
117         'common/extensions/api/commands/commands_handler.h',
118         'common/extensions/api/extension_action/action_info.cc',
119         'common/extensions/api/extension_action/action_info.h',
120         'common/extensions/api/extension_action/browser_action_handler.cc',
121         'common/extensions/api/extension_action/browser_action_handler.h',
122         'common/extensions/api/extension_action/page_action_handler.cc',
123         'common/extensions/api/extension_action/page_action_handler.h',
124         'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
125         'common/extensions/api/file_browser_handlers/file_browser_handler.h',
126         'common/extensions/api/file_handlers/file_handlers_parser.cc',
127         'common/extensions/api/file_handlers/file_handlers_parser.h',
128         'common/extensions/api/i18n/default_locale_handler.cc',
129         'common/extensions/api/i18n/default_locale_handler.h',
130         'common/extensions/api/identity/oauth2_manifest_handler.cc',
131         'common/extensions/api/identity/oauth2_manifest_handler.h',
132         'common/extensions/api/input_ime/input_components_handler.cc',
133         'common/extensions/api/input_ime/input_components_handler.h',
134         'common/extensions/api/managed_mode_private/managed_mode_handler.cc',
135         'common/extensions/api/managed_mode_private/managed_mode_handler.h',
136         'common/extensions/api/media_galleries_private/media_galleries_handler.h',
137         'common/extensions/api/media_galleries_private/media_galleries_handler.cc',
138         'common/extensions/api/messaging/message.h',
139         'common/extensions/api/omnibox/omnibox_handler.cc',
140         'common/extensions/api/omnibox/omnibox_handler.h',
141         'common/extensions/api/plugins/plugins_handler.cc',
142         'common/extensions/api/plugins/plugins_handler.h',
143         'common/extensions/api/sockets/sockets_manifest_handler.cc',
144         'common/extensions/api/sockets/sockets_manifest_handler.h',
145         'common/extensions/api/sockets/sockets_manifest_data.cc',
146         'common/extensions/api/sockets/sockets_manifest_data.h',
147         'common/extensions/api/sockets/sockets_manifest_permission.cc',
148         'common/extensions/api/sockets/sockets_manifest_permission.h',
149         'common/extensions/api/speech/tts_engine_manifest_handler.cc',
150         'common/extensions/api/speech/tts_engine_manifest_handler.h',
151         'common/extensions/api/spellcheck/spellcheck_handler.cc',
152         'common/extensions/api/spellcheck/spellcheck_handler.h',
153         'common/extensions/api/storage/storage_schema_manifest_handler.cc',
154         'common/extensions/api/storage/storage_schema_manifest_handler.h',
155         'common/extensions/api/system_indicator/system_indicator_handler.cc',
156         'common/extensions/api/system_indicator/system_indicator_handler.h',
157         'common/extensions/api/url_handlers/url_handlers_parser.cc',
158         'common/extensions/api/url_handlers/url_handlers_parser.h',
159         'common/extensions/chrome_extensions_client.cc',
160         'common/extensions/chrome_extensions_client.h',
161         'common/extensions/chrome_manifest_handlers.cc',
162         'common/extensions/chrome_manifest_handlers.h',
163         'common/extensions/command.cc',
164         'common/extensions/command.h',
165         'common/extensions/dom_action_types.h',
166         'common/extensions/extension_constants.cc',
167         'common/extensions/extension_constants.h',
168         'common/extensions/extension_file_util.cc',
169         'common/extensions/extension_file_util.h',
170         'common/extensions/extension_icon_set.cc',
171         'common/extensions/extension_icon_set.h',
172         'common/extensions/extension_l10n_util.cc',
173         'common/extensions/extension_l10n_util.h',
174         'common/extensions/extension_messages.cc',
175         'common/extensions/extension_messages.h',
176         'common/extensions/extension_process_policy.cc',
177         'common/extensions/extension_process_policy.h',
178         'common/extensions/features/api_feature.cc',
179         'common/extensions/features/api_feature.h',
180         'common/extensions/features/base_feature_provider.cc',
181         'common/extensions/features/base_feature_provider.h',
182         'common/extensions/features/complex_feature.cc',
183         'common/extensions/features/complex_feature.h',
184         'common/extensions/features/feature_channel.cc',
185         'common/extensions/features/feature_channel.h',
186         'common/extensions/features/manifest_feature.cc',
187         'common/extensions/features/manifest_feature.h',
188         'common/extensions/features/permission_feature.cc',
189         'common/extensions/features/permission_feature.h',
190         'common/extensions/features/simple_feature.cc',
191         'common/extensions/features/simple_feature.h',
192         'common/extensions/manifest_handler_helpers.cc',
193         'common/extensions/manifest_handler_helpers.h',
194         'common/extensions/manifest_handlers/app_isolation_info.cc',
195         'common/extensions/manifest_handlers/app_isolation_info.h',
196         'common/extensions/manifest_handlers/app_launch_info.cc',
197         'common/extensions/manifest_handlers/app_launch_info.h',
198         'common/extensions/manifest_handlers/content_scripts_handler.cc',
199         'common/extensions/manifest_handlers/content_scripts_handler.h',
200         'common/extensions/manifest_handlers/externally_connectable.cc',
201         'common/extensions/manifest_handlers/externally_connectable.h',
202         'common/extensions/manifest_handlers/icons_handler.cc',
203         'common/extensions/manifest_handlers/icons_handler.h',
204         'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
205         'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
206         'common/extensions/manifest_handlers/nacl_modules_handler.cc',
207         'common/extensions/manifest_handlers/nacl_modules_handler.h',
208         'common/extensions/manifest_handlers/settings_overrides_handler.cc',
209         'common/extensions/manifest_handlers/settings_overrides_handler.h',
210         'common/extensions/manifest_handlers/theme_handler.cc',
211         'common/extensions/manifest_handlers/theme_handler.h',
212         'common/extensions/manifest_url_handler.cc',
213         'common/extensions/manifest_url_handler.h',
214         'common/extensions/message_bundle.cc',
215         'common/extensions/message_bundle.h',
216         'common/extensions/mime_types_handler.cc',
217         'common/extensions/mime_types_handler.h',
218         'common/extensions/permissions/bluetooth_permission.cc',
219         'common/extensions/permissions/bluetooth_permission.h',
220         'common/extensions/permissions/bluetooth_permission_data.cc',
221         'common/extensions/permissions/bluetooth_permission_data.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/omaha_query_params/omaha_query_params.cc',
322         'common/omaha_query_params/omaha_query_params.h',
323         'common/omnibox_focus_state.h',
324         'common/partial_circular_buffer.cc',
325         'common/partial_circular_buffer.h',
326         'common/pepper_flash.cc',
327         'common/pepper_flash.h',
328         'common/pepper_permission_util.cc',
329         'common/pepper_permission_util.h',
330         'common/pref_names_util.cc',
331         'common/pref_names_util.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:api',
417             '<(DEPTH)/components/components.gyp:autofill_core_common',
418             '<(DEPTH)/components/components.gyp:autofill_content_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!="ios" and chrome_multiple_dll!=1', {
464           'dependencies': [
465             '<(DEPTH)/webkit/glue/webkit_glue.gyp:glue',
466           ],
467         }],
468         ['OS=="android"', {
469           'sources/': [
470             ['exclude', '^common/chrome_version_info_posix.cc'],
471             ['exclude', '^common/service_'],
472           ],
473           'sources!': [
474             'common/badge_util.cc',
475             'common/extensions/api/extension_action/browser_action_handler.cc',
476             'common/extensions/api/extension_action/page_action_handler.cc',
477             'common/extensions/api/spellcheck/spellcheck_handler.cc',
478             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
479             'common/extensions/manifest_handlers/nacl_modules_handler.cc',
480             'common/icon_with_badge_image_source.cc',
481             'common/importer/imported_bookmark_entry.cc',
482             'common/importer/importer_bridge.cc',
483             'common/importer/importer_data_types.cc',
484             'common/importer/importer_url_row.cc',
485             'common/net/url_util.cc',
486             'common/spellcheck_common.cc',
487           ],
488         }],
489         ['OS=="win"', {
490           'include_dirs': [
491             '<(DEPTH)/breakpad/src',
492             '<(DEPTH)/third_party/wtl/include',
493           ],
494         }],
495         ['enable_mdns == 1', {
496             'sources': [
497               'common/local_discovery/local_discovery_messages.h',
498             ]
499         }],
500         ['toolkit_uses_gtk == 1', {
501           'dependencies': [
502             '../build/linux/system.gyp:gtk',
503           ],
504           'export_dependent_settings': [
505             '../third_party/sqlite/sqlite.gyp:sqlite',
506           ],
507           'link_settings': {
508             'libraries': [
509               '-lX11',
510               '-lXrender',
511               '-lXss',
512               '-lXext',
513             ],
514           },
515         }],
516         ['chromeos==1', {
517           'sources!': [
518             'common/chrome_version_info_linux.cc',
519           ],
520         }],
521         ['OS=="mac"', {
522           'dependencies': [
523             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
524             '../third_party/mach_override/mach_override.gyp:mach_override',
525           ],
526           'include_dirs': [
527             '<(DEPTH)/breakpad/src',
528           ],
529           'sources!': [
530             'common/child_process_logging_posix.cc',
531             'common/chrome_version_info_posix.cc',
532           ],
533         }],
534         ['remoting==1', {
535           'dependencies': [
536             '../remoting/remoting.gyp:remoting_client_plugin',
537           ],
538         }],
539         ['enable_automation==0', {
540           'sources/': [
541             ['exclude', '^common/automation_']
542           ]
543         }],
544         ['enable_plugins==0', {
545           'source!' : [
546             'common/pepper_permission_util.cc',
547           ],
548         }],
549         ['use_system_nspr==1', {
550           'dependencies': [
551             '<(DEPTH)/base/third_party/nspr/nspr.gyp:nspr',
552           ],
553         }],
554         ['enable_webrtc==0', {
555           'sources!': [
556             'common/media/webrtc_logging_messages.h',
557           ]
558         }],
559         ['enable_printing==0', {
560           'sources!': [
561             'common/print_messages.cc',
562             'common/print_messages.h',
563           ]
564         }],
565         ['configuration_policy==1', {
566           'dependencies': [
567             '<(DEPTH)/components/components.gyp:policy',
568           ],
569         }],
570       ],
571       'target_conditions': [
572         ['OS == "ios"', {
573           'sources/': [
574             # Pull in specific Mac files for iOS (which have been filtered out
575             # by file name rules).
576             ['include', '^common/chrome_version_info_mac\\.mm$'],
577           ],
578         }],
579       ],
580       'export_dependent_settings': [
581         '../base/base.gyp:base',
582         'metrics_proto',
583       ],
584     },
585     {
586       'target_name': 'common_version',
587       'type': 'none',
588       'conditions': [
589         ['os_posix == 1 and OS != "mac" and OS != "ios"', {
590           'direct_dependent_settings': {
591             'include_dirs': [
592               '<(SHARED_INTERMEDIATE_DIR)',
593             ],
594           },
595           # Because posix_version generates a header, we must set the
596           # hard_dependency flag.
597           'hard_dependency': 1,
598           'actions': [
599             {
600               'action_name': 'posix_version',
601               'variables': {
602                 'lastchange_path':
603                   '<(DEPTH)/build/util/LASTCHANGE',
604                 'version_py_path': 'tools/build/version.py',
605                 'version_path': 'VERSION',
606                 'template_input_path': 'common/chrome_version_info_posix.h.version',
607               },
608               'conditions': [
609                 [ 'branding == "Chrome"', {
610                   'variables': {
611                      'branding_path':
612                        'app/theme/google_chrome/BRANDING',
613                   },
614                 }, { # else branding!="Chrome"
615                   'variables': {
616                      'branding_path':
617                        'app/theme/chromium/BRANDING',
618                   },
619                 }],
620               ],
621               'inputs': [
622                 '<(template_input_path)',
623                 '<(version_path)',
624                 '<(branding_path)',
625                 '<(lastchange_path)',
626               ],
627               'outputs': [
628                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
629               ],
630               'action': [
631                 'python',
632                 '<(version_py_path)',
633                 '-f', '<(version_path)',
634                 '-f', '<(branding_path)',
635                 '-f', '<(lastchange_path)',
636                 '<(template_input_path)',
637                 '<@(_outputs)',
638               ],
639               'message': 'Generating version information',
640             },
641           ],
642         }],
643       ],
644     },
645     {
646       'target_name': 'common_net',
647       'type': 'static_library',
648       'sources': [
649         'common/net/net_error_info.cc',
650         'common/net/net_error_info.h',
651         'common/net/net_resource_provider.cc',
652         'common/net/net_resource_provider.h',
653         'common/net/predictor_common.h',
654         'common/net/url_fixer_upper.cc',
655         'common/net/url_fixer_upper.h',
656         'common/net/url_util.cc',
657         'common/net/url_util.h',
658         'common/net/x509_certificate_model.cc',
659         'common/net/x509_certificate_model_nss.cc',
660         'common/net/x509_certificate_model_openssl.cc',
661         'common/net/x509_certificate_model.h',
662       ],
663       'dependencies': [
664         '<(DEPTH)/base/base.gyp:base',
665         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
666         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
667         '<(DEPTH)/crypto/crypto.gyp:crypto',
668         '<(DEPTH)/net/net.gyp:net_resources',
669         '<(DEPTH)/net/net.gyp:net',
670         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
671         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
672       ],
673       'conditions': [
674         ['OS != "ios"', {
675           'dependencies': [
676             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
677           ],
678         }, {  # OS == ios
679           'sources!': [
680             'common/net/net_resource_provider.cc',
681             'common/net/x509_certificate_model.cc',
682           ],
683         }],
684         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
685             'dependencies': [
686               '../build/linux/system.gyp:ssl',
687             ],
688           },
689         ],
690         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
691             'sources!': [
692               'common/net/x509_certificate_model_nss.cc',
693               'common/net/x509_certificate_model_openssl.cc',
694             ],
695           },
696         ],
697         ['OS == "android"', {
698             'dependencies': [
699               '../third_party/openssl/openssl.gyp:openssl',
700             ],
701           },
702         ],
703         ['use_openssl==1', {
704             'sources!': [
705               'common/net/x509_certificate_model_nss.cc',
706             ],
707           },
708           {  # else !use_openssl: remove the unneeded files
709             'sources!': [
710               'common/net/x509_certificate_model_openssl.cc',
711             ],
712           },
713         ],
714         ['OS=="win"', {
715             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
716             'msvs_disabled_warnings': [4267, ],
717           },
718         ],
719       ],
720     },
721     {
722       # Protobuf compiler / generator for the safebrowsing client
723       # model proto and the client-side detection (csd) request
724       # protocol buffer.
725       'target_name': 'safe_browsing_proto',
726       'type': 'static_library',
727       'sources': [
728         'common/safe_browsing/client_model.proto',
729         'common/safe_browsing/crx_info.proto',
730         'common/safe_browsing/csd.proto'
731       ],
732       'variables': {
733         'proto_in_dir': 'common/safe_browsing',
734         'proto_out_dir': 'chrome/common/safe_browsing',
735       },
736       'includes': [ '../build/protoc.gypi' ],
737     },
738     {
739       # Protobuf compiler / generator for UMA (User Metrics Analysis).
740       'target_name': 'metrics_proto',
741       'type': 'static_library',
742       'sources': [
743         'common/metrics/proto/chrome_experiments.proto',
744         'common/metrics/proto/chrome_user_metrics_extension.proto',
745         'common/metrics/proto/histogram_event.proto',
746         'common/metrics/proto/omnibox_event.proto',
747         'common/metrics/proto/perf_data.proto',
748         'common/metrics/proto/permuted_entropy_cache.proto',
749         'common/metrics/proto/profiler_event.proto',
750         'common/metrics/proto/system_profile.proto',
751         'common/metrics/proto/user_action_event.proto',
752       ],
753       'variables': {
754         'proto_in_dir': 'common/metrics/proto',
755         'proto_out_dir': 'chrome/common/metrics/proto',
756       },
757       'includes': [ '../build/protoc.gypi' ],
758     },
759   ],
760 }