Fix app list and overflow icon drawing problems
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blob95a6ba27d16670b7e55b3554df8b1fa4309c577f
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         # TODO(thakis): Turn this on. Blocked on g_log_function_mapping in
13         # ipc_message_macros.h. http://crbug.com/101600
14         #'enable_wexit_time_destructors': 1,
15       },
16       'include_dirs': [
17           '..',
18           '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_content_client.cc.
19         ],
20       'direct_dependent_settings': {
21         'include_dirs': [
22           '..',
23         ],
24       },
25       'dependencies': [
26         # TODO(gregoryd): chrome_resources and chrome_strings could be
27         #  shared with the 64-bit target, but it does not work due to a gyp
28         # issue.
29         'common_constants',
30         'common_net',
31         'common_version',
32         'metrics_proto',
33         '<(DEPTH)/base/base.gyp:base',
34         '<(DEPTH)/base/base.gyp:base_i18n',
35         '<(DEPTH)/base/base.gyp:base_static',
36         '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
37         '<(DEPTH)/chrome/app/policy/cloud_policy_codegen.gyp:policy',
38         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
39         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
40         '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
41         '<(DEPTH)/chrome/common/extensions/api/api.gyp:api',
42         '<(DEPTH)/content/content.gyp:content_common',
43         '<(DEPTH)/ipc/ipc.gyp:ipc',
44         '<(DEPTH)/net/net.gyp:net',
45         '<(DEPTH)/printing/printing.gyp:printing',
46         '<(DEPTH)/skia/skia.gyp:skia',
47         '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
48         '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
49         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
50         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
51         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
52         '<(DEPTH)/third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
53         '<(DEPTH)/third_party/re2/re2.gyp:re2',
54         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
55         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
56         '<(DEPTH)/ui/ui.gyp:ui_resources',
57         '<(DEPTH)/webkit/support/webkit_support.gyp:glue',
58         '<(DEPTH)/webkit/support/webkit_support.gyp:user_agent',
59       ],
60       'sources': [
61         'common/all_messages.h',
62         'common/attrition_experiments.h',
63         'common/auto_start_linux.cc',
64         'common/auto_start_linux.h',
65         'common/autofill_messages.h',
66         'common/automation_constants.cc',
67         'common/automation_constants.h',
68         'common/automation_events.cc',
69         'common/automation_events.h',
70         'common/automation_id.cc',
71         'common/automation_id.h',
72         'common/automation_messages.cc',
73         'common/automation_messages.h',
74         'common/automation_messages_internal.h',
75         'common/badge_util.cc',
76         'common/badge_util.h',
77         'common/bzip2_error_handler.cc',
78         'common/child_process_logging.h',
79         'common/child_process_logging_mac.mm',
80         'common/child_process_logging_posix.cc',
81         'common/child_process_logging_win.cc',
82         'common/chrome_content_client.cc',
83         'common/chrome_content_client.h',
84         'common/chrome_notification_types.h',
85         'common/chrome_result_codes.h',
86         'common/chrome_sandbox_type_mac.h',
87         'common/chrome_utility_messages.h',
88         'common/chrome_version_info.cc',
89         'common/chrome_version_info_chromeos.cc',
90         'common/chrome_version_info_posix.cc',
91         'common/chrome_version_info_mac.mm',
92         'common/chrome_version_info_win.cc',
93         'common/chrome_version_info.h',
94         'common/cloud_print/cloud_print_class_mac.h',
95         'common/cloud_print/cloud_print_class_mac.mm',
96         'common/cloud_print/cloud_print_helpers.cc',
97         'common/cloud_print/cloud_print_helpers.h',
98         'common/cloud_print/cloud_print_proxy_info.cc',
99         'common/cloud_print/cloud_print_proxy_info.h',
100         'common/common_message_generator.cc',
101         'common/common_message_generator.h',
102         'common/common_param_traits.cc',
103         'common/common_param_traits.h',
104         'common/common_param_traits_macros.h',
105         'common/content_settings.cc',
106         'common/content_settings.h',
107         'common/content_settings_helper.cc',
108         'common/content_settings_helper.h',
109         'common/content_settings_pattern.cc',
110         'common/content_settings_pattern.h',
111         'common/content_settings_pattern_parser.cc',
112         'common/content_settings_pattern_parser.h',
113         'common/content_settings_types.h',
114         'common/custom_handlers/protocol_handler.cc',
115         'common/custom_handlers/protocol_handler.h',
116         'common/extensions/command.cc',
117         'common/extensions/command.h',
118         'common/extensions/csp_validator.cc',
119         'common/extensions/csp_validator.h',
120         'common/extensions/draggable_region.h',
121         'common/extensions/event_filter.cc',
122         'common/extensions/event_filter.h',
123         'common/extensions/event_filtering_info.cc',
124         'common/extensions/event_filtering_info.h',
125         'common/extensions/event_matcher.cc',
126         'common/extensions/event_matcher.h',
127         'common/extensions/extension.cc',
128         'common/extensions/extension.h',
129         'common/extensions/extension_action.cc',
130         'common/extensions/extension_action.h',
131         'common/extensions/extension_constants.cc',
132         'common/extensions/extension_constants.h',
133         'common/extensions/extension_error_utils.cc',
134         'common/extensions/extension_error_utils.h',
135         'common/extensions/extension_file_util.cc',
136         'common/extensions/extension_file_util.h',
137         'common/extensions/extension_icon_set.cc',
138         'common/extensions/extension_icon_set.h',
139         'common/extensions/extension_l10n_util.cc',
140         'common/extensions/extension_l10n_util.h',
141         'common/extensions/extension_localization_peer.cc',
142         'common/extensions/extension_localization_peer.h',
143         'common/extensions/extension_manifest_constants.cc',
144         'common/extensions/extension_manifest_constants.h',
145         'common/extensions/extension_messages.cc',
146         'common/extensions/extension_messages.h',
147         'common/extensions/extension_process_policy.cc',
148         'common/extensions/extension_process_policy.h',
149         'common/extensions/extension_resource.cc',
150         'common/extensions/extension_resource.h',
151         'common/extensions/extension_set.cc',
152         'common/extensions/extension_set.h',
153         'common/extensions/extension_switch_utils.cc',
154         'common/extensions/extension_switch_utils.h',
155         'common/extensions/features/feature.cc',
156         'common/extensions/features/feature.h',
157         'common/extensions/features/feature_provider.h',
158         'common/extensions/features/manifest_feature.cc',
159         'common/extensions/features/manifest_feature.h',
160         'common/extensions/features/permission_feature.cc',
161         'common/extensions/features/permission_feature.h',
162         'common/extensions/features/simple_feature_provider.cc',
163         'common/extensions/features/simple_feature_provider.h',
164         'common/extensions/file_browser_handler.cc',
165         'common/extensions/file_browser_handler.h',
166         'common/extensions/manifest.cc',
167         'common/extensions/manifest.h',
168         'common/extensions/matcher/regex_set_matcher.cc',
169         'common/extensions/matcher/regex_set_matcher.h',
170         'common/extensions/matcher/string_pattern.cc',
171         'common/extensions/matcher/string_pattern.h',
172         'common/extensions/matcher/substring_set_matcher.cc',
173         'common/extensions/matcher/substring_set_matcher.h',
174         'common/extensions/matcher/url_matcher.cc',
175         'common/extensions/matcher/url_matcher.h',
176         'common/extensions/matcher/url_matcher_constants.cc',
177         'common/extensions/matcher/url_matcher_constants.h',
178         'common/extensions/matcher/url_matcher_factory.cc',
179         'common/extensions/matcher/url_matcher_factory.h',
180         'common/extensions/matcher/url_matcher_helpers.cc',
181         'common/extensions/matcher/url_matcher_helpers.h',
182         'common/extensions/message_bundle.cc',
183         'common/extensions/message_bundle.h',
184         'common/extensions/permissions/api_permission.cc',
185         'common/extensions/permissions/api_permission.h',
186         'common/extensions/permissions/api_permission_set.cc',
187         'common/extensions/permissions/api_permission_set.h',
188         'common/extensions/permissions/filesystem_permission.h',
189         'common/extensions/permissions/filesystem_permission.cc',
190         'common/extensions/permissions/media_galleries_permission.h',
191         'common/extensions/permissions/media_galleries_permission.cc',
192         'common/extensions/permissions/permission_message.cc',
193         'common/extensions/permissions/permission_message.h',
194         'common/extensions/permissions/permission_set.cc',
195         'common/extensions/permissions/permission_set.h',
196         'common/extensions/permissions/permissions_info.cc',
197         'common/extensions/permissions/permissions_info.h',
198         'common/extensions/permissions/socket_permission.cc',
199         'common/extensions/permissions/socket_permission.h',
200         'common/extensions/permissions/socket_permission_data.cc',
201         'common/extensions/permissions/socket_permission_data.h',
202         'common/extensions/unpacker.cc',
203         'common/extensions/unpacker.h',
204         'common/extensions/update_manifest.cc',
205         'common/extensions/update_manifest.h',
206         'common/extensions/url_pattern.cc',
207         'common/extensions/url_pattern.h',
208         'common/extensions/url_pattern_set.cc',
209         'common/extensions/url_pattern_set.h',
210         'common/extensions/user_script.cc',
211         'common/extensions/user_script.h',
212         'common/extensions/value_counter.cc',
213         'common/extensions/value_counter.h',
214         'common/extensions/api/extension_api.cc',
215         'common/extensions/api/extension_api.h',
216         'common/external_ipc_fuzzer.h',
217         'common/external_ipc_fuzzer.cc',
218         'common/favicon_url.cc',
219         'common/favicon_url.h',
220         'common/icon_messages.h',
221         'common/important_file_writer.cc',
222         'common/important_file_writer.h',
223         'common/instant_types.cc',
224         'common/instant_types.h',
225         'common/json_pref_store.cc',
226         'common/json_pref_store.h',
227         'common/json_schema_constants.cc',
228         'common/json_schema_constants.h',
229         'common/json_schema_validator.cc',
230         'common/json_schema_validator.h',
231         'common/jstemplate_builder.cc',
232         'common/jstemplate_builder.h',
233         'common/localized_error.cc',
234         'common/localized_error.h',
235         'common/logging_chrome.cc',
236         'common/logging_chrome.h',
237         'common/mac/app_mode_common.h',
238         'common/mac/app_mode_common.mm',
239         'common/mac/cfbundle_blocker.h',
240         'common/mac/cfbundle_blocker.mm',
241         'common/mac/launchd.h',
242         'common/mac/launchd.mm',
243         'common/mac/objc_method_swizzle.h',
244         'common/mac/objc_method_swizzle.mm',
245         'common/mac/objc_zombie.h',
246         'common/mac/objc_zombie.mm',
247         'common/metrics/entropy_provider.cc',
248         'common/metrics/entropy_provider.h',
249         'common/metrics/metrics_log_base.cc',
250         'common/metrics/metrics_log_base.h',
251         'common/metrics/metrics_log_manager.cc',
252         'common/metrics/metrics_log_manager.h',
253         'common/metrics/metrics_service_base.cc',
254         'common/metrics/metrics_service_base.h',
255         'common/metrics/metrics_util.cc',
256         'common/metrics/metrics_util.h',
257         'common/metrics/variations/variations_util.cc',
258         'common/metrics/variations/variations_util.h',
259         'common/multi_process_lock.h',
260         'common/multi_process_lock_linux.cc',
261         'common/multi_process_lock_mac.cc',
262         'common/multi_process_lock_win.cc',
263         'common/nacl_cmd_line.cc',
264         'common/nacl_cmd_line.h',
265         'common/nacl_messages.cc',
266         'common/nacl_messages.h',
267         'common/nacl_types.cc',
268         'common/nacl_types.h',
269         'common/password_generation_util.cc',
270         'common/password_generation_util.h',
271         'common/pepper_flash.cc',
272         'common/pepper_flash.h',
273         'common/persistent_pref_store.h',
274         'common/pref_store.cc',
275         'common/pref_store.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/thumbnail_support.cc',
304         'common/thumbnail_support.h',
305         'common/time_format.cc',
306         'common/time_format.h',
307         'common/url_constants.cc',
308         'common/url_constants.h',
309         'common/view_type.cc',
310         'common/view_type.h',
311         'common/visitedlink_common.cc',
312         'common/visitedlink_common.h',
313         'common/web_apps.cc',
314         'common/web_apps.h',
315         'common/web_resource/web_resource_unpacker.cc',
316         'common/web_resource/web_resource_unpacker.h',
317         'common/worker_thread_ticker.cc',
318         'common/worker_thread_ticker.h',
319         'common/zip.cc',  # Requires zlib directly.
320         'common/zip.h',
321         'common/zip_internal.cc',
322         'common/zip_internal.h',
323         'common/zip_reader.cc',
324         'common/zip_reader.h',
325       ],
326       'conditions': [
327         ['OS=="android"', {
328           'sources/': [
329             ['exclude', '^common/service_'],
330           ],
331         }],
332         ['OS=="win"', {
333           'include_dirs': [
334             '<(DEPTH)/third_party/wtl/include',
335           ]
336         }],
337         ['toolkit_uses_gtk == 1', {
338           'dependencies': [
339             '../build/linux/system.gyp:gtk',
340           ],
341           'export_dependent_settings': [
342             '../third_party/sqlite/sqlite.gyp:sqlite',
343           ],
344           'link_settings': {
345             'libraries': [
346               '-lX11',
347               '-lXrender',
348               '-lXss',
349               '-lXext',
350             ],
351           },
352         }],
353         ['OS=="linux" and selinux==1', {
354           'dependencies': [
355             '../build/linux/system.gyp:selinux',
356           ],
357         }],
358         ['chromeos==0', {
359           'sources!': [
360             'common/chrome_version_info_chromeos.cc',
361           ],
362         }, {  # chromeos==1
363           'sources!': [
364             'common/chrome_version_info_linux.cc',
365           ],
366         }],
367         ['OS=="mac"', {
368           'dependencies': [
369             '../third_party/mach_override/mach_override.gyp:mach_override',
370           ],
371           'include_dirs': [
372             '../third_party/GTM',
373           ],
374           'sources!': [
375             'common/child_process_logging_posix.cc',
376             'common/chrome_version_info_posix.cc',
377           ],
378         }],
379         ['remoting==1', {
380           'dependencies': [
381             '../remoting/remoting.gyp:remoting_client_plugin',
382           ],
383         }],
384       ],
385       'export_dependent_settings': [
386         '../base/base.gyp:base',
387         'metrics_proto',
388       ],
389     },
390     {
391       'target_name': 'common_version',
392       'type': 'none',
393       'conditions': [
394         ['os_posix == 1 and OS != "mac"', {
395           'direct_dependent_settings': {
396             'include_dirs': [
397               '<(SHARED_INTERMEDIATE_DIR)',
398             ],
399           },
400           # Because posix_version generates a header, we must set the
401           # hard_dependency flag.
402           'hard_dependency': 1,
403           'actions': [
404             {
405               'action_name': 'posix_version',
406               'variables': {
407                 'lastchange_path':
408                   '<(DEPTH)/build/util/LASTCHANGE',
409                 'version_py_path': 'tools/build/version.py',
410                 'version_path': 'VERSION',
411                 'template_input_path': 'common/chrome_version_info_posix.h.version',
412               },
413               'conditions': [
414                 [ 'branding == "Chrome"', {
415                   'variables': {
416                      'branding_path':
417                        'app/theme/google_chrome/BRANDING',
418                   },
419                 }, { # else branding!="Chrome"
420                   'variables': {
421                      'branding_path':
422                        'app/theme/chromium/BRANDING',
423                   },
424                 }],
425               ],
426               'inputs': [
427                 '<(template_input_path)',
428                 '<(version_path)',
429                 '<(branding_path)',
430                 '<(lastchange_path)',
431               ],
432               'outputs': [
433                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
434               ],
435               'action': [
436                 'python',
437                 '<(version_py_path)',
438                 '-f', '<(version_path)',
439                 '-f', '<(branding_path)',
440                 '-f', '<(lastchange_path)',
441                 '<(template_input_path)',
442                 '<@(_outputs)',
443               ],
444               'message': 'Generating version information',
445             },
446           ],
447         }],
448       ],
449     },
450     {
451       'target_name': 'common_net',
452       'type': 'static_library',
453       'sources': [
454         'common/net/net_resource_provider.cc',
455         'common/net/net_resource_provider.h',
456         'common/net/predictor_common.h',
457         'common/net/url_util.cc',
458         'common/net/url_util.h',
459         'common/net/x509_certificate_model.cc',
460         'common/net/x509_certificate_model_nss.cc',
461         'common/net/x509_certificate_model_openssl.cc',
462         'common/net/x509_certificate_model.h',
463       ],
464       'dependencies': [
465         '<(DEPTH)/base/base.gyp:base',
466         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
467         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
468         '<(DEPTH)/crypto/crypto.gyp:crypto',
469         '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
470         '<(DEPTH)/net/net.gyp:net_resources',
471         '<(DEPTH)/net/net.gyp:net',
472         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
473         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
474       ],
475       'conditions': [
476         ['os_posix == 1 and OS != "mac" and OS != "android"', {
477             'dependencies': [
478               '../build/linux/system.gyp:ssl',
479             ],
480           },
481         ],
482         ['os_posix != 1 or OS == "mac"', {
483             'sources!': [
484               'common/net/x509_certificate_model_nss.cc',
485               'common/net/x509_certificate_model_openssl.cc',
486             ],
487           },
488         ],
489         ['OS == "android"', {
490             'dependencies': [
491               '../third_party/openssl/openssl.gyp:openssl',
492             ],
493           },
494         ],
495         ['use_openssl==1', {
496             'sources!': [
497               'common/net/x509_certificate_model_nss.cc',
498             ],
499           },
500           {  # else !use_openssl: remove the unneeded files
501             'sources!': [
502               'common/net/x509_certificate_model_openssl.cc',
503             ],
504           },
505         ],
506       ],
507     },
508     {
509       # Protobuf compiler / generator for the safebrowsing client
510       # model proto and the client-side detection (csd) request
511       # protocol buffer.
512       'target_name': 'safe_browsing_proto',
513       'type': 'static_library',
514       'sources': [
515         'common/safe_browsing/client_model.proto',
516         'common/safe_browsing/csd.proto'
517       ],
518       'variables': {
519         'proto_in_dir': 'common/safe_browsing',
520         'proto_out_dir': 'chrome/common/safe_browsing',
521       },
522       'includes': [ '../build/protoc.gypi' ],
523     },
524     {
525       # Protobuf compiler / generator for UMA (User Metrics Analysis).
526       'target_name': 'metrics_proto',
527       'type': 'static_library',
528       'sources': [
529         'common/metrics/proto/chrome_experiments.proto',
530         'common/metrics/proto/chrome_user_metrics_extension.proto',
531         'common/metrics/proto/histogram_event.proto',
532         'common/metrics/proto/omnibox_event.proto',
533         'common/metrics/proto/profiler_event.proto',
534         'common/metrics/proto/system_profile.proto',
535         'common/metrics/proto/user_action_event.proto',
536       ],
537       'variables': {
538         'proto_in_dir': 'common/metrics/proto',
539         'proto_out_dir': 'chrome/common/metrics/proto',
540       },
541       'includes': [ '../build/protoc.gypi' ],
542     },
543   ],