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.
7 'content_shell_product_name': 'Content Shell',
8 # The "19" is so that sites that sniff for version think that this is
9 # something reasonably current; the "77.34.5" is a hint that this isn't a
11 'content_shell_version': '19.77.34.5',
14 'use_custom_freetype%': 1,
16 'use_custom_freetype%': 0,
22 'target_name': 'content_shell_lib',
23 'type': 'static_library',
24 'defines!': ['CONTENT_IMPLEMENTATION'],
25 'defines': ['CONTENT_SHELL_VERSION="<(content_shell_version)"'],
35 'content_ppapi_plugin',
37 'content_shell_resources',
40 'test_support_content',
41 'content_resources.gyp:content_resources',
42 '../base/base.gyp:base',
43 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
45 '../media/media.gyp:media',
47 '../net/net.gyp:net_resources',
48 '../skia/skia.gyp:skia',
49 '../third_party/WebKit/public/blink_test_runner.gyp:blink_test_runner',
52 '../url/url.gyp:url_lib',
53 '../v8/tools/gyp/v8.gyp:v8',
54 '../webkit/support/webkit_support.gyp:webkit_support',
55 '../webkit/webkit_resources.gyp:webkit_resources',
61 'shell/android/shell_jni_registrar.cc',
62 'shell/android/shell_jni_registrar.h',
63 'shell/android/shell_manager.cc',
64 'shell/android/shell_manager.h',
65 'shell/app/paths_mac.h',
66 'shell/app/paths_mac.mm',
67 'shell/app/shell_main_delegate.cc',
68 'shell/app/shell_main_delegate.h',
69 'shell/app/shell_main_delegate_mac.h',
70 'shell/app/shell_main_delegate_mac.mm',
71 'shell/app/webkit_test_platform_support.h',
72 'shell/app/webkit_test_platform_support_android.cc',
73 'shell/app/webkit_test_platform_support_linux.cc',
74 'shell/app/webkit_test_platform_support_mac.mm',
75 'shell/app/webkit_test_platform_support_win.cc',
76 'shell/common/shell_content_client.cc',
77 'shell/common/shell_content_client.h',
78 'shell/common/shell_messages.cc',
79 'shell/common/shell_messages.h',
80 'shell/common/shell_switches.cc',
81 'shell/common/shell_switches.h',
82 'shell/common/shell_test_configuration.cc',
83 'shell/common/shell_test_configuration.h',
84 'shell/common/webkit_test_helpers.cc',
85 'shell/common/webkit_test_helpers.h',
86 'shell/geolocation/shell_access_token_store.cc',
87 'shell/geolocation/shell_access_token_store.h',
88 'shell/minimal_shell.cc',
89 'shell/minimal_shell.h',
90 'shell/notify_done_forwarder.cc',
91 'shell/notify_done_forwarder.h',
92 'shell/renderer/shell_content_renderer_client.cc',
93 'shell/renderer/shell_content_renderer_client.h',
94 'shell/renderer/shell_render_process_observer.cc',
95 'shell/renderer/shell_render_process_observer.h',
96 'shell/renderer/shell_render_view_observer.cc',
97 'shell/renderer/shell_render_view_observer.h',
98 'shell/renderer/webkit_test_runner.cc',
99 'shell/renderer/webkit_test_runner.h',
102 'shell/shell_android.cc',
103 'shell/shell_aura.cc',
104 'shell/shell_gtk.cc',
105 'shell/shell_mac.mm',
106 'shell/shell_win.cc',
107 'shell/shell_application_mac.h',
108 'shell/shell_application_mac.mm',
109 'shell/shell_browser_context.cc',
110 'shell/shell_browser_context.h',
111 'shell/shell_browser_main.cc',
112 'shell/shell_browser_main.h',
113 'shell/shell_browser_main_parts.cc',
114 'shell/shell_browser_main_parts.h',
115 'shell/shell_browser_main_parts_mac.mm',
116 'shell/shell_content_browser_client.cc',
117 'shell/shell_content_browser_client.h',
118 'shell/shell_devtools_delegate.cc',
119 'shell/shell_devtools_delegate.h',
120 'shell/shell_devtools_frontend.cc',
121 'shell/shell_devtools_frontend.h',
122 'shell/shell_download_manager_delegate.cc',
123 'shell/shell_download_manager_delegate.h',
124 'shell/shell_javascript_dialog_manager.cc',
125 'shell/shell_javascript_dialog_manager.h',
126 'shell/shell_javascript_dialog_gtk.cc',
127 'shell/shell_javascript_dialog_mac.mm',
128 'shell/shell_javascript_dialog_win.cc',
129 'shell/shell_javascript_dialog.h',
130 'shell/shell_layout_tests_android.cc',
131 'shell/shell_layout_tests_android.h',
132 'shell/shell_login_dialog_gtk.cc',
133 'shell/shell_login_dialog_mac.mm',
134 'shell/shell_login_dialog.cc',
135 'shell/shell_login_dialog.h',
136 'shell/shell_message_filter.cc',
137 'shell/shell_message_filter.h',
138 'shell/shell_net_log.cc',
139 'shell/shell_net_log.h',
140 'shell/shell_network_delegate.cc',
141 'shell/shell_network_delegate.h',
142 'shell/shell_plugin_service_filter.cc',
143 'shell/shell_plugin_service_filter.h',
144 'shell/shell_quota_permission_context.cc',
145 'shell/shell_quota_permission_context.h',
146 'shell/shell_resource_dispatcher_host_delegate.cc',
147 'shell/shell_resource_dispatcher_host_delegate.h',
148 'shell/shell_url_request_context_getter.cc',
149 'shell/shell_url_request_context_getter.h',
150 'shell/shell_web_contents_view_delegate_android.cc',
151 'shell/shell_web_contents_view_delegate_creator.h',
152 'shell/shell_web_contents_view_delegate_gtk.cc',
153 'shell/shell_web_contents_view_delegate_mac.mm',
154 'shell/shell_web_contents_view_delegate_win.cc',
155 'shell/shell_web_contents_view_delegate.h',
156 'shell/webkit_test_controller.cc',
157 'shell/webkit_test_controller.h',
161 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
165 ['OS=="win" and win_use_allocator_shim==1', {
167 '../base/allocator/allocator.gyp:allocator',
171 'resource_include_dirs': [
172 '<(SHARED_INTERMEDIATE_DIR)/webkit',
175 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
181 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
186 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
187 'msvs_disabled_warnings': [ 4267, ],
191 '../build/linux/system.gyp:fontconfig',
196 'content_shell_jni_headers',
198 }, { # else: OS!="android"
200 # This dependency is for running DRT against the content shell, and
201 # this combination is not yet supported on Android.
202 '../webkit/support/webkit_support.gyp:webkit_support',
205 ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (android_use_tcmalloc==1)', {
207 # This is needed by content/app/content_main_runner.cc
208 '../base/allocator/allocator.gyp:allocator',
213 '../ui/aura/aura.gyp:aura',
214 '../ui/base/strings/ui_strings.gyp:ui_strings',
215 '../ui/views/controls/webview/webview.gyp:webview',
216 '../ui/views/views.gyp:views',
217 '../ui/views/views.gyp:views_test_support',
218 '../ui/ui.gyp:ui_resources',
221 ['exclude', 'shell/shell_gtk.cc'],
222 ['exclude', 'shell/shell_win.cc'],
227 '../chromeos/chromeos.gyp:chromeos',
232 '../ash/ash.gyp:ash',
235 ['use_custom_freetype==1', {
237 '../third_party/freetype2/freetype2.gyp:freetype2',
240 ['enable_plugins==0', {
242 ['exclude', 'shell/shell_plugin_service_filter.cc'],
243 ['exclude', 'shell/shell_plugin_service_filter.h'],
249 'target_name': 'content_shell_resources',
252 'generate_content_shell_resources',
255 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
257 'includes': [ '../build/grit_target.gypi' ],
260 'destination': '<(PRODUCT_DIR)',
262 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
268 'target_name': 'generate_content_shell_resources',
271 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
275 'action_name': 'content_shell_resources',
277 'grit_grd_file': 'shell/shell_resources.grd',
279 'includes': [ '../build/grit_action.gypi' ],
284 # We build a minimal set of resources so WebKit in content_shell has
285 # access to necessary resources.
286 'target_name': 'content_shell_pak',
289 'browser/devtools/devtools_resources.gyp:devtools_resources',
290 'content_resources.gyp:content_resources',
291 'content_shell_resources',
292 '<(DEPTH)/net/net.gyp:net_resources',
293 '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
294 '<(DEPTH)/ui/ui.gyp:ui_resources',
295 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
296 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
299 ['OS!="android" and OS!="ios"', {
301 'browser/tracing/tracing_resources.gyp:tracing_resources',
306 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
310 'action_name': 'repack_content_shell_pack',
313 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
314 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
315 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
316 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
317 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
318 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
319 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
320 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
321 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
322 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
323 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
324 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
325 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
332 'action': ['python', '<(repack_path)', '<@(_outputs)',
337 '<(PRODUCT_DIR)/content_shell.pak',
341 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
349 'target_name': 'content_shell',
350 'type': 'executable',
352 'defines!': ['CONTENT_IMPLEMENTATION'],
359 '../third_party/mesa/mesa.gyp:osmesa',
360 '../tools/imagediff/image_diff.gyp:image_diff',
366 'app/startup_helper_win.cc',
367 'shell/app/shell_main.cc',
369 'mac_bundle_resources': [
370 'shell/app/app.icns',
371 'shell/app/app-Info.plist',
373 # TODO(mark): Come up with a fancier way to do this. It should only
374 # be necessary to list app-Info.plist once, not the three times it is
376 'mac_bundle_resources!': [
377 'shell/app/app-Info.plist',
380 'INFOPLIST_FILE': 'shell/app/app-Info.plist',
384 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
387 'AdditionalManifestFiles': [
388 'shell/app/shell.exe.manifest',
393 ['OS=="win" and win_use_allocator_shim==1', {
395 '../base/allocator/allocator.gyp:allocator',
400 'shell/app/shell.rc',
406 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
412 ['OS == "win" or toolkit_uses_gtk == 1', {
414 '../sandbox/sandbox.gyp:sandbox',
416 }], # OS=="win" or toolkit_uses_gtk == 1
417 ['toolkit_uses_gtk == 1', {
419 '<(DEPTH)/build/linux/system.gyp:gtk',
421 }], # toolkit_uses_gtk
423 'product_name': '<(content_shell_product_name)',
428 'content_shell_framework',
429 'content_shell_helper_app',
433 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
435 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
441 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
443 '../build/mac/copy_framework_unversioned.sh',
444 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
445 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
449 'postbuild_name': 'Fix Framework Link',
453 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
454 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
455 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
459 # Modify the Info.plist as needed.
460 'postbuild_name': 'Tweak Info.plist',
461 'action': ['../build/mac/tweak_info_plist.py',
463 '--version=<(content_shell_version)'],
466 # This postbuid step is responsible for creating the following
469 # Content Shell Helper EH.app and Content Shell Helper NP.app are
470 # created from Content Shell Helper.app.
472 # The EH helper is marked for an executable heap. The NP helper
473 # is marked for no PIE (ASLR).
474 'postbuild_name': 'Make More Helpers',
476 '../build/mac/make_more_helpers.sh',
478 '<(content_shell_product_name)',
482 # Make sure there isn't any Objective-C in the shell's
484 'postbuild_name': 'Verify No Objective-C',
486 '../build/mac/verify_no_objc.sh',
493 '../tools/imagediff/image_diff.gyp:image_diff',
496 ['OS=="android" and android_webview_build==0', {
498 '../tools/imagediff/image_diff.gyp:image_diff#host',
500 }], # OS=="android" and android_webview_build==0
504 'target_name': 'content_shell_builder',
515 'target_name': 'content_shell_framework',
516 'type': 'shared_library',
517 'product_name': '<(content_shell_product_name) Framework',
519 'mac_bundle_resources': [
520 'shell/app/English.lproj/HttpAuth.xib',
521 'shell/app/English.lproj/MainMenu.xib',
522 '<(PRODUCT_DIR)/content_shell.pak'
531 'shell/app/shell_content_main.cc',
532 'shell/app/shell_content_main.h',
536 # Copy FFmpeg binaries for audio/video support.
537 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
539 '<(PRODUCT_DIR)/ffmpegsumo.so',
544 ['enable_webrtc==1', {
546 'libpeer_target_type%': 'static_library',
549 ['libpeer_target_type!="static_library"', {
551 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
553 '<(PRODUCT_DIR)/libpeerconnection.so',
560 }, # target content_shell_framework
562 'target_name': 'content_shell_helper_app',
563 'type': 'executable',
564 'variables': { 'enable_wexit_time_destructors': 1, },
565 'product_name': '<(content_shell_product_name) Helper',
568 'content_shell_framework',
571 'shell/app/shell_main.cc',
572 'shell/app/helper-Info.plist',
574 # TODO(mark): Come up with a fancier way to do this. It should only
575 # be necessary to list helper-Info.plist once, not the three times it
577 'mac_bundle_resources!': [
578 'shell/app/helper-Info.plist',
580 # TODO(mark): For now, don't put any resources into this app. Its
581 # resources directory will be a symbolic link to the browser app's
582 # resources directory.
583 'mac_bundle_resources/': [
587 'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
591 # The framework defines its load-time path
592 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
593 # (chrome). A different relative path needs to be used in
594 # content_shell_helper_app.
595 'postbuild_name': 'Fix Framework Link',
599 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
600 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
601 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
605 # Modify the Info.plist as needed. The script explains why this
606 # is needed. This is also done in the chrome and chrome_dll
607 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
608 # are used because Breakpad, Keystone, and SCM keys are
609 # never placed into the helper.
610 'postbuild_name': 'Tweak Info.plist',
611 'action': ['../build/mac/tweak_info_plist.py',
615 '--version=<(content_shell_version)'],
618 # Make sure there isn't any Objective-C in the helper app's
620 'postbuild_name': 'Verify No Objective-C',
622 '../build/mac/verify_no_objc.sh',
627 ['component=="shared_library"', {
629 'LD_RUNPATH_SEARCH_PATHS': [
630 # Get back from Content Shell.app/Contents/Frameworks/
631 # Helper.app/Contents/MacOS
632 '@loader_path/../../../../../..',
637 }, # target content_shell_helper_app
643 # TODO(jrg): Update this action and other jni generators to only
644 # require specifying the java directory and generate the rest.
645 'target_name': 'content_shell_jni_headers',
648 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
649 'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
650 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
651 'shell/android/java/src/org/chromium/content_shell/Shell.java',
653 'direct_dependent_settings': {
655 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
659 'jni_gen_package': 'content/shell',
661 'includes': [ '../build/jni_generator.gypi' ],
664 'target_name': 'libcontent_shell_content_view',
665 'type': 'shared_library',
667 'content_shell_jni_headers',
670 # Skia is necessary to ensure the dependencies needed by
671 # WebContents are included.
672 '../skia/skia.gyp:skia',
673 '<(DEPTH)/media/media.gyp:player_android',
676 'shell/android/shell_library_loader.cc',
677 'shell/android/shell_library_loader.h',
680 ['android_webview_build==1', {
682 '-lgabi++', # For rtti
688 'target_name': 'content_shell_java',
694 'java_in_dir': '../content/shell/android/java',
695 'has_java_resources': 1,
696 'R_package': 'org.chromium.content_shell',
697 'R_package_relpath': 'org/chromium/content_shell',
699 'includes': [ '../build/java.gypi' ],
702 # content_shell_apk creates a .jar as a side effect. Any java targets
703 # that need that .jar in their classpath should depend on this target,
704 # content_shell_apk_java. Dependents of content_shell_apk receive its
705 # jar path in the variable 'apk_output_jar_path'. This target should
706 # only be used by targets which instrument content_shell_apk.
707 'target_name': 'content_shell_apk_java',
712 'includes': [ '../build/apk_fake_jar.gypi' ],
715 'target_name': 'content_shell_apk',
719 'content_java_test_support',
720 'content_shell_java',
721 'libcontent_shell_content_view',
722 '../base/base.gyp:base_java',
723 '../media/media.gyp:media_java',
724 '../net/net.gyp:net_java',
725 '../ui/ui.gyp:ui_java',
728 'apk_name': 'ContentShell',
729 'manifest_package_name': 'org.chromium.content_shell_apk',
730 'java_in_dir': 'shell/android/shell_apk',
731 'resource_dir': 'shell/android/shell_apk/res',
732 'native_lib_target': 'libcontent_shell_content_view',
733 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
734 'asset_location': '<(ant_build_out)/content_shell/assets',
736 'includes': [ '../build/java_apk.gypi' ],