Change LOG to VLOG in ThumbnailTabHelper.
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blobcb2904bc0c1349212f0a943ad2bfa1cdea254084
1 # Copyright (c) 2012 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         'metrics_proto',
30         '<(DEPTH)/base/base.gyp:base',
31         '<(DEPTH)/base/base.gyp:base_i18n',
32         '<(DEPTH)/base/base.gyp:base_prefs',
33         '<(DEPTH)/base/base.gyp:base_static',
34         '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
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)/content/content.gyp:content_common',
40         '<(DEPTH)/net/net.gyp:net',
41         '<(DEPTH)/skia/skia.gyp:skia',
42         '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
43         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
44         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
45         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
46         '<(DEPTH)/third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
47         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
48         '<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
49         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
50         '<(DEPTH)/ui/ui.gyp:ui_resources',
51         '<(DEPTH)/webkit/support/webkit_support.gyp:user_agent',
52       ],
53       'sources': [
54         'common/all_messages.h',
55         'common/attrition_experiments.h',
56         'common/auto_start_linux.cc',
57         'common/auto_start_linux.h',
58         'common/autofill_messages.h',
59         'common/automation_constants.cc',
60         'common/automation_constants.h',
61         'common/automation_events.cc',
62         'common/automation_events.h',
63         'common/automation_id.cc',
64         'common/automation_id.h',
65         'common/automation_messages.cc',
66         'common/automation_messages.h',
67         'common/automation_messages_internal.h',
68         'common/badge_util.cc',
69         'common/badge_util.h',
70         'common/bzip2_error_handler.cc',
71         'common/cancelable_task_tracker.cc',
72         'common/cancelable_task_tracker.h',
73         'common/child_process_logging.h',
74         'common/child_process_logging_mac.mm',
75         'common/child_process_logging_posix.cc',
76         'common/child_process_logging_win.cc',
77         'common/chrome_content_client.cc',
78         'common/chrome_content_client.h',
79         'common/chrome_notification_types.h',
80         'common/chrome_result_codes.h',
81         'common/chrome_sandbox_type_mac.h',
82         'common/chrome_utility_messages.h',
83         'common/chrome_version_info.cc',
84         'common/chrome_version_info_chromeos.cc',
85         'common/chrome_version_info_posix.cc',
86         'common/chrome_version_info_mac.mm',
87         'common/chrome_version_info_win.cc',
88         'common/chrome_version_info.h',
89         'common/cloud_print/cloud_print_class_mac.h',
90         'common/cloud_print/cloud_print_class_mac.mm',
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_settings.cc',
101         'common/content_settings.h',
102         'common/content_settings_helper.cc',
103         'common/content_settings_helper.h',
104         'common/content_settings_pattern.cc',
105         'common/content_settings_pattern.h',
106         'common/content_settings_pattern_parser.cc',
107         'common/content_settings_pattern_parser.h',
108         'common/content_settings_types.h',
109         'common/custom_handlers/protocol_handler.cc',
110         'common/custom_handlers/protocol_handler.h',
111         'common/descriptors_android.h',
112         'common/extensions/command.cc',
113         'common/extensions/command.h',
114         'common/extensions/csp_validator.cc',
115         'common/extensions/csp_validator.h',
116         'common/extensions/draggable_region.cc',
117         'common/extensions/draggable_region.h',
118         'common/extensions/event_filter.cc',
119         'common/extensions/event_filter.h',
120         'common/extensions/event_filtering_info.cc',
121         'common/extensions/event_filtering_info.h',
122         'common/extensions/event_matcher.cc',
123         'common/extensions/event_matcher.h',
124         'common/extensions/extension.cc',
125         'common/extensions/extension.h',
126         'common/extensions/extension_constants.cc',
127         'common/extensions/extension_constants.h',
128         'common/extensions/extension_error_utils.cc',
129         'common/extensions/extension_error_utils.h',
130         'common/extensions/extension_file_util.cc',
131         'common/extensions/extension_file_util.h',
132         'common/extensions/extension_icon_set.cc',
133         'common/extensions/extension_icon_set.h',
134         'common/extensions/extension_l10n_util.cc',
135         'common/extensions/extension_l10n_util.h',
136         'common/extensions/extension_localization_peer.cc',
137         'common/extensions/extension_localization_peer.h',
138         'common/extensions/extension_manifest_constants.cc',
139         'common/extensions/extension_manifest_constants.h',
140         'common/extensions/extension_messages.cc',
141         'common/extensions/extension_messages.h',
142         'common/extensions/extension_process_policy.cc',
143         'common/extensions/extension_process_policy.h',
144         'common/extensions/extension_resource.cc',
145         'common/extensions/extension_resource.h',
146         'common/extensions/extension_set.cc',
147         'common/extensions/extension_set.h',
148         'common/extensions/feature_switch.cc',
149         'common/extensions/feature_switch.h',
150         'common/extensions/features/feature.cc',
151         'common/extensions/features/feature.h',
152         'common/extensions/features/feature_provider.h',
153         'common/extensions/features/manifest_feature.cc',
154         'common/extensions/features/manifest_feature.h',
155         'common/extensions/features/permission_feature.cc',
156         'common/extensions/features/permission_feature.h',
157         'common/extensions/features/simple_feature_provider.cc',
158         'common/extensions/features/simple_feature_provider.h',
159         'common/extensions/file_browser_handler.cc',
160         'common/extensions/file_browser_handler.h',
161         'common/extensions/manifest.cc',
162         'common/extensions/manifest.h',
163         'common/extensions/matcher/regex_set_matcher.cc',
164         'common/extensions/matcher/regex_set_matcher.h',
165         'common/extensions/matcher/string_pattern.cc',
166         'common/extensions/matcher/string_pattern.h',
167         'common/extensions/matcher/substring_set_matcher.cc',
168         'common/extensions/matcher/substring_set_matcher.h',
169         'common/extensions/matcher/url_matcher.cc',
170         'common/extensions/matcher/url_matcher.h',
171         'common/extensions/matcher/url_matcher_constants.cc',
172         'common/extensions/matcher/url_matcher_constants.h',
173         'common/extensions/matcher/url_matcher_factory.cc',
174         'common/extensions/matcher/url_matcher_factory.h',
175         'common/extensions/matcher/url_matcher_helpers.cc',
176         'common/extensions/matcher/url_matcher_helpers.h',
177         'common/extensions/message_bundle.cc',
178         'common/extensions/message_bundle.h',
179         'common/extensions/permissions/api_permission.cc',
180         'common/extensions/permissions/api_permission.h',
181         'common/extensions/permissions/api_permission_set.cc',
182         'common/extensions/permissions/api_permission_set.h',
183         'common/extensions/permissions/permission_message.cc',
184         'common/extensions/permissions/permission_message.h',
185         'common/extensions/permissions/permission_set.cc',
186         'common/extensions/permissions/permission_set.h',
187         'common/extensions/permissions/permissions_info.cc',
188         'common/extensions/permissions/permissions_info.h',
189         'common/extensions/permissions/socket_permission.cc',
190         'common/extensions/permissions/socket_permission.h',
191         'common/extensions/permissions/socket_permission_data.cc',
192         'common/extensions/permissions/socket_permission_data.h',
193         'common/extensions/request_media_access_permission_helper.cc',
194         'common/extensions/request_media_access_permission_helper.h',
195         'common/extensions/unpacker.cc',
196         'common/extensions/unpacker.h',
197         'common/extensions/update_manifest.cc',
198         'common/extensions/update_manifest.h',
199         'common/extensions/url_pattern.cc',
200         'common/extensions/url_pattern.h',
201         'common/extensions/url_pattern_set.cc',
202         'common/extensions/url_pattern_set.h',
203         'common/extensions/user_script.cc',
204         'common/extensions/user_script.h',
205         'common/extensions/value_counter.cc',
206         'common/extensions/value_counter.h',
207         'common/extensions/api/extension_api.cc',
208         'common/extensions/api/extension_api.h',
209         'common/external_ipc_fuzzer.h',
210         'common/external_ipc_fuzzer.cc',
211         'common/favicon_url.cc',
212         'common/favicon_url.h',
213         'common/form_data.cc',
214         'common/form_data.h',
215         'common/form_data_predictions.cc',
216         'common/form_data_predictions.h',
217         'common/form_field_data.cc',
218         'common/form_field_data.h',
219         'common/form_field_data_predictions.cc',
220         'common/form_field_data_predictions.h',
221         'common/icon_messages.h',
222         'common/instant_types.cc',
223         'common/instant_types.h',
224         'common/json_schema_constants.cc',
225         'common/json_schema_constants.h',
226         'common/json_schema_validator.cc',
227         'common/json_schema_validator.h',
228         'common/jstemplate_builder.cc',
229         'common/jstemplate_builder.h',
230         'common/localized_error.cc',
231         'common/localized_error.h',
232         'common/logging_chrome.cc',
233         'common/logging_chrome.h',
234         'common/mac/app_mode_common.h',
235         'common/mac/app_mode_common.mm',
236         'common/mac/cfbundle_blocker.h',
237         'common/mac/cfbundle_blocker.mm',
238         'common/mac/launchd.h',
239         'common/mac/launchd.mm',
240         'common/mac/nscoder_util.h',
241         'common/mac/nscoder_util.mm',
242         'common/mac/objc_method_swizzle.h',
243         'common/mac/objc_method_swizzle.mm',
244         'common/mac/objc_zombie.h',
245         'common/mac/objc_zombie.mm',
246         'common/metrics/entropy_provider.cc',
247         'common/metrics/entropy_provider.h',
248         'common/metrics/metrics_log_base.cc',
249         'common/metrics/metrics_log_base.h',
250         'common/metrics/metrics_log_manager.cc',
251         'common/metrics/metrics_log_manager.h',
252         'common/metrics/metrics_service_base.cc',
253         'common/metrics/metrics_service_base.h',
254         'common/metrics/metrics_util.cc',
255         'common/metrics/metrics_util.h',
256         'common/metrics/variations/variations_util.cc',
257         'common/metrics/variations/variations_util.h',
258         'common/multi_process_lock.h',
259         'common/multi_process_lock_linux.cc',
260         'common/multi_process_lock_mac.cc',
261         'common/multi_process_lock_win.cc',
262         'common/nacl_cmd_line.cc',
263         'common/nacl_cmd_line.h',
264         'common/nacl_messages.cc',
265         'common/nacl_messages.h',
266         'common/nacl_types.cc',
267         'common/nacl_types.h',
268         'common/password_form_fill_data.cc',
269         'common/password_form_fill_data.h',
270         'common/password_generation_util.cc',
271         'common/password_generation_util.h',
272         'common/pepper_flash.cc',
273         'common/pepper_flash.h',
274         'common/pref_names_util.cc',
275         'common/pref_names_util.h',
276         'common/print_messages.cc',
277         'common/print_messages.h',
278         'common/profiling.cc',
279         'common/profiling.h',
280         'common/ref_counted_util.h',
281         'common/render_messages.cc',
282         'common/render_messages.h',
283         'common/safe_browsing/safebrowsing_messages.h',
284         'common/search_provider.h',
285         'common/service_messages.h',
286         'common/service_process_util.cc',
287         'common/service_process_util.h',
288         'common/service_process_util_linux.cc',
289         'common/service_process_util_mac.mm',
290         'common/service_process_util_posix.cc',
291         'common/service_process_util_posix.h',
292         'common/service_process_util_win.cc',
293         'common/spellcheck_common.cc',
294         'common/spellcheck_common.h',
295         'common/spellcheck_messages.h',
296         'common/spellcheck_result.h',
297         'common/startup_metric_utils.cc',
298         'common/startup_metric_utils.h',
299         'common/switch_utils.cc',
300         'common/switch_utils.h',
301         'common/thumbnail_score.cc',
302         'common/thumbnail_score.h',
303         'common/time_format.cc',
304         'common/time_format.h',
305         'common/url_constants.cc',
306         'common/url_constants.h',
307         'common/view_type.cc',
308         'common/view_type.h',
309         'common/visitedlink_common.cc',
310         'common/visitedlink_common.h',
311         'common/web_apps.cc',
312         'common/web_apps.h',
313         'common/web_resource/web_resource_unpacker.cc',
314         'common/web_resource/web_resource_unpacker.h',
315         'common/worker_thread_ticker.cc',
316         'common/worker_thread_ticker.h',
317         'common/zip.cc',  # Requires zlib directly.
318         'common/zip.h',
319         'common/zip_internal.cc',
320         'common/zip_internal.h',
321         'common/zip_reader.cc',
322         'common/zip_reader.h',
323       ],
324       'conditions': [
325         ['OS != "ios"', {
326           'dependencies': [
327             '<(DEPTH)/chrome/app/policy/cloud_policy_codegen.gyp:policy',
328             '<(DEPTH)/chrome/common/extensions/api/api.gyp:api',
329             '<(DEPTH)/ipc/ipc.gyp:ipc',
330             '<(DEPTH)/printing/printing.gyp:printing',
331             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
332             '<(DEPTH)/third_party/re2/re2.gyp:re2',
333             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
334             '<(DEPTH)/webkit/support/webkit_support.gyp:glue',
335           ],
336         }, {  # OS == ios
337           'sources/': [
338             ['exclude', '^common/automation_'],
339             ['exclude', '^common/child_process_'],
340             ['exclude', '^common/chrome_content_client\\.cc$'],
341             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
342             ['exclude', '^common/common_message_generator\\.cc$'],
343             ['exclude', '^common/common_param_traits'],
344             ['exclude', '^common/custom_handlers/'],
345             ['exclude', '^common/extensions/'],
346             ['exclude', '^common/external_ipc_fuzzer\\.'],
347             ['exclude', '^common/logging_chrome\\.'],
348             ['exclude', '^common/multi_process_'],
349             ['exclude', '^common/nacl_'],
350             ['exclude', '^common/pepper_flash\\.'],
351             ['exclude', '^common/profiling\\.'],
352             ['exclude', '^common/service_process_util_'],
353             ['exclude', '^common/spellcheck_'],
354             ['exclude', '^common/web_apps\\.'],
355             # TODO(ios): Include files here as they are made to work; once
356             # everything is online, remove everything below here and just
357             # use the exclusions above.
358             ['exclude', '.*'],
359           ],
360         }],
361         ['OS=="android"', {
362           'sources/': [
363             ['exclude', '^common/service_'],
364           ],
365           'dependencies!': [
366             '<(DEPTH)/chrome/app/policy/cloud_policy_codegen.gyp:policy',
367           ],
368         }],
369         ['OS=="win"', {
370           'include_dirs': [
371             '<(DEPTH)/third_party/wtl/include',
372           ]
373         }],
374         ['toolkit_uses_gtk == 1', {
375           'dependencies': [
376             '../build/linux/system.gyp:gtk',
377           ],
378           'export_dependent_settings': [
379             '../third_party/sqlite/sqlite.gyp:sqlite',
380           ],
381           'link_settings': {
382             'libraries': [
383               '-lX11',
384               '-lXrender',
385               '-lXss',
386               '-lXext',
387             ],
388           },
389         }],
390         ['OS=="linux" and selinux==1', {
391           'dependencies': [
392             '../build/linux/system.gyp:selinux',
393           ],
394         }],
395         ['chromeos==1', {
396           'sources!': [
397             'common/chrome_version_info_linux.cc',
398           ],
399         }],
400         ['OS=="mac"', {
401           'dependencies': [
402             '../third_party/mach_override/mach_override.gyp:mach_override',
403           ],
404           'include_dirs': [
405             '../third_party/GTM',
406           ],
407           'sources!': [
408             'common/child_process_logging_posix.cc',
409             'common/chrome_version_info_posix.cc',
410           ],
411         }],
412         ['remoting==1', {
413           'dependencies': [
414             '../remoting/remoting.gyp:remoting_client_plugin',
415           ],
416         }],
417       ],
418       'target_conditions': [
419         ['OS == "ios"', {
420           'sources/': [
421             # Pull in specific Mac files for iOS (which have been filtered out
422             # by file name rules).
423             ['include', '^common/chrome_version_info_mac\\.mm$'],
424           ],
425         }],
426       ],
427       'export_dependent_settings': [
428         '../base/base.gyp:base',
429         'metrics_proto',
430       ],
431     },
432     {
433       'target_name': 'common_version',
434       'type': 'none',
435       'conditions': [
436         ['os_posix == 1 and OS != "mac" and OS != "ios"', {
437           'direct_dependent_settings': {
438             'include_dirs': [
439               '<(SHARED_INTERMEDIATE_DIR)',
440             ],
441           },
442           # Because posix_version generates a header, we must set the
443           # hard_dependency flag.
444           'hard_dependency': 1,
445           'actions': [
446             {
447               'action_name': 'posix_version',
448               'variables': {
449                 'lastchange_path':
450                   '<(DEPTH)/build/util/LASTCHANGE',
451                 'version_py_path': 'tools/build/version.py',
452                 'version_path': 'VERSION',
453                 'template_input_path': 'common/chrome_version_info_posix.h.version',
454               },
455               'conditions': [
456                 [ 'branding == "Chrome"', {
457                   'variables': {
458                      'branding_path':
459                        'app/theme/google_chrome/BRANDING',
460                   },
461                 }, { # else branding!="Chrome"
462                   'variables': {
463                      'branding_path':
464                        'app/theme/chromium/BRANDING',
465                   },
466                 }],
467               ],
468               'inputs': [
469                 '<(template_input_path)',
470                 '<(version_path)',
471                 '<(branding_path)',
472                 '<(lastchange_path)',
473               ],
474               'outputs': [
475                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
476               ],
477               'action': [
478                 'python',
479                 '<(version_py_path)',
480                 '-f', '<(version_path)',
481                 '-f', '<(branding_path)',
482                 '-f', '<(lastchange_path)',
483                 '<(template_input_path)',
484                 '<@(_outputs)',
485               ],
486               'message': 'Generating version information',
487             },
488           ],
489         }],
490       ],
491     },
492     {
493       'target_name': 'common_net',
494       'type': 'static_library',
495       'sources': [
496         'common/net/net_resource_provider.cc',
497         'common/net/net_resource_provider.h',
498         'common/net/predictor_common.h',
499         'common/net/url_util.cc',
500         'common/net/url_util.h',
501         'common/net/x509_certificate_model.cc',
502         'common/net/x509_certificate_model_nss.cc',
503         'common/net/x509_certificate_model_openssl.cc',
504         'common/net/x509_certificate_model.h',
505       ],
506       'dependencies': [
507         '<(DEPTH)/base/base.gyp:base',
508         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
509         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
510         '<(DEPTH)/crypto/crypto.gyp:crypto',
511         '<(DEPTH)/net/net.gyp:net_resources',
512         '<(DEPTH)/net/net.gyp:net',
513         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
514         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
515       ],
516       'conditions': [
517         ['OS != "ios"', {
518           'dependencies': [
519             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
520           ],
521         }, {  # OS == ios
522           'sources!': [
523             'common/net/net_resource_provider.cc',
524             'common/net/x509_certificate_model.cc',
525           ],
526         }],
527         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
528             'dependencies': [
529               '../build/linux/system.gyp:ssl',
530             ],
531           },
532         ],
533         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
534             'sources!': [
535               'common/net/x509_certificate_model_nss.cc',
536               'common/net/x509_certificate_model_openssl.cc',
537             ],
538           },
539         ],
540         ['OS == "android"', {
541             'dependencies': [
542               '../third_party/openssl/openssl.gyp:openssl',
543             ],
544           },
545         ],
546         ['use_openssl==1', {
547             'sources!': [
548               'common/net/x509_certificate_model_nss.cc',
549             ],
550           },
551           {  # else !use_openssl: remove the unneeded files
552             'sources!': [
553               'common/net/x509_certificate_model_openssl.cc',
554             ],
555           },
556         ],
557       ],
558     },
559     {
560       # Protobuf compiler / generator for the safebrowsing client
561       # model proto and the client-side detection (csd) request
562       # protocol buffer.
563       'target_name': 'safe_browsing_proto',
564       'type': 'static_library',
565       'sources': [
566         'common/safe_browsing/client_model.proto',
567         'common/safe_browsing/csd.proto'
568       ],
569       'variables': {
570         'proto_in_dir': 'common/safe_browsing',
571         'proto_out_dir': 'chrome/common/safe_browsing',
572       },
573       'includes': [ '../build/protoc.gypi' ],
574     },
575     {
576       # Protobuf compiler / generator for UMA (User Metrics Analysis).
577       'target_name': 'metrics_proto',
578       'type': 'static_library',
579       'sources': [
580         'common/metrics/proto/chrome_experiments.proto',
581         'common/metrics/proto/chrome_user_metrics_extension.proto',
582         'common/metrics/proto/histogram_event.proto',
583         'common/metrics/proto/omnibox_event.proto',
584         'common/metrics/proto/profiler_event.proto',
585         'common/metrics/proto/system_profile.proto',
586         'common/metrics/proto/user_action_event.proto',
587       ],
588       'variables': {
589         'proto_in_dir': 'common/metrics/proto',
590         'proto_out_dir': 'chrome/common/metrics/proto',
591       },
592       'includes': [ '../build/protoc.gypi' ],
593     },
594   ],