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.
8 'target_name': 'common',
9 'type': 'static_library',
11 'chrome_common_target': 1,
12 'enable_wexit_time_destructors': 1,
16 '<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_content_client.cc.
18 'direct_dependent_settings': {
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
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',
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',
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.
319 'common/zip_internal.cc',
320 'common/zip_internal.h',
321 'common/zip_reader.cc',
322 'common/zip_reader.h',
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',
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.
363 ['exclude', '^common/service_'],
366 '<(DEPTH)/chrome/app/policy/cloud_policy_codegen.gyp:policy',
371 '<(DEPTH)/third_party/wtl/include',
374 ['toolkit_uses_gtk == 1', {
376 '../build/linux/system.gyp:gtk',
378 'export_dependent_settings': [
379 '../third_party/sqlite/sqlite.gyp:sqlite',
390 ['OS=="linux" and selinux==1', {
392 '../build/linux/system.gyp:selinux',
397 'common/chrome_version_info_linux.cc',
402 '../third_party/mach_override/mach_override.gyp:mach_override',
405 '../third_party/GTM',
408 'common/child_process_logging_posix.cc',
409 'common/chrome_version_info_posix.cc',
414 '../remoting/remoting.gyp:remoting_client_plugin',
418 'target_conditions': [
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$'],
427 'export_dependent_settings': [
428 '../base/base.gyp:base',
433 'target_name': 'common_version',
436 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
437 'direct_dependent_settings': {
439 '<(SHARED_INTERMEDIATE_DIR)',
442 # Because posix_version generates a header, we must set the
443 # hard_dependency flag.
444 'hard_dependency': 1,
447 'action_name': 'posix_version',
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',
456 [ 'branding == "Chrome"', {
459 'app/theme/google_chrome/BRANDING',
461 }, { # else branding!="Chrome"
464 'app/theme/chromium/BRANDING',
469 '<(template_input_path)',
472 '<(lastchange_path)',
475 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
479 '<(version_py_path)',
480 '-f', '<(version_path)',
481 '-f', '<(branding_path)',
482 '-f', '<(lastchange_path)',
483 '<(template_input_path)',
486 'message': 'Generating version information',
493 'target_name': 'common_net',
494 'type': 'static_library',
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',
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',
519 '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
523 'common/net/net_resource_provider.cc',
524 'common/net/x509_certificate_model.cc',
527 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
529 '../build/linux/system.gyp:ssl',
533 ['os_posix != 1 or OS == "mac" or OS == "ios"', {
535 'common/net/x509_certificate_model_nss.cc',
536 'common/net/x509_certificate_model_openssl.cc',
540 ['OS == "android"', {
542 '../third_party/openssl/openssl.gyp:openssl',
548 'common/net/x509_certificate_model_nss.cc',
551 { # else !use_openssl: remove the unneeded files
553 'common/net/x509_certificate_model_openssl.cc',
560 # Protobuf compiler / generator for the safebrowsing client
561 # model proto and the client-side detection (csd) request
563 'target_name': 'safe_browsing_proto',
564 'type': 'static_library',
566 'common/safe_browsing/client_model.proto',
567 'common/safe_browsing/csd.proto'
570 'proto_in_dir': 'common/safe_browsing',
571 'proto_out_dir': 'chrome/common/safe_browsing',
573 'includes': [ '../build/protoc.gypi' ],
576 # Protobuf compiler / generator for UMA (User Metrics Analysis).
577 'target_name': 'metrics_proto',
578 'type': 'static_library',
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',
589 'proto_in_dir': 'common/metrics/proto',
590 'proto_out_dir': 'chrome/common/metrics/proto',
592 'includes': [ '../build/protoc.gypi' ],