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.gyp:blink',
50 '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
51 '../third_party/WebKit/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner',
54 '../url/url.gyp:url_lib',
55 '../v8/tools/gyp/v8.gyp:v8',
56 '../webkit/support/webkit_support.gyp:webkit_resources',
57 '../webkit/support/webkit_support.gyp:webkit_support',
63 'shell/android/shell_jni_registrar.cc',
64 'shell/android/shell_jni_registrar.h',
65 'shell/android/shell_manager.cc',
66 'shell/android/shell_manager.h',
67 'shell/app/shell_main_delegate.cc',
68 'shell/app/shell_main_delegate.h',
69 'shell/common/shell_content_client.cc',
70 'shell/common/shell_content_client.h',
71 'shell/common/shell_messages.cc',
72 'shell/common/shell_messages.h',
73 'shell/common/shell_switches.cc',
74 'shell/common/shell_switches.h',
75 'shell/common/shell_test_configuration.cc',
76 'shell/common/shell_test_configuration.h',
77 'shell/common/webkit_test_helpers.cc',
78 'shell/common/webkit_test_helpers.h',
79 'shell/geolocation/shell_access_token_store.cc',
80 'shell/geolocation/shell_access_token_store.h',
81 'shell/minimal_ash.cc',
82 'shell/minimal_ash.h',
83 'shell/notify_done_forwarder.cc',
84 'shell/notify_done_forwarder.h',
87 'shell/renderer/shell_content_renderer_client.cc',
88 'shell/renderer/shell_content_renderer_client.h',
89 'shell/renderer/shell_media_stream_client.cc',
90 'shell/renderer/shell_media_stream_client.h',
91 'shell/renderer/shell_render_process_observer.cc',
92 'shell/renderer/shell_render_process_observer.h',
93 'shell/renderer/webkit_test_runner.cc',
94 'shell/renderer/webkit_test_runner.h',
97 'shell/shell_android.cc',
98 'shell/shell_aura.cc',
100 'shell/shell_mac.mm',
101 'shell/shell_win.cc',
102 'shell/shell_application_mac.h',
103 'shell/shell_application_mac.mm',
104 'shell/shell_browser_context.cc',
105 'shell/shell_browser_context.h',
106 'shell/shell_browser_main.cc',
107 'shell/shell_browser_main.h',
108 'shell/shell_browser_main_parts.cc',
109 'shell/shell_browser_main_parts.h',
110 'shell/shell_browser_main_parts_mac.mm',
111 'shell/shell_content_browser_client.cc',
112 'shell/shell_content_browser_client.h',
113 'shell/shell_devtools_delegate.cc',
114 'shell/shell_devtools_delegate.h',
115 'shell/shell_devtools_frontend.cc',
116 'shell/shell_devtools_frontend.h',
117 'shell/shell_download_manager_delegate.cc',
118 'shell/shell_download_manager_delegate.h',
119 'shell/shell_javascript_dialog_manager.cc',
120 'shell/shell_javascript_dialog_manager.h',
121 'shell/shell_javascript_dialog_gtk.cc',
122 'shell/shell_javascript_dialog_mac.mm',
123 'shell/shell_javascript_dialog_win.cc',
124 'shell/shell_javascript_dialog.h',
125 'shell/shell_layout_tests_android.cc',
126 'shell/shell_layout_tests_android.h',
127 'shell/shell_login_dialog_gtk.cc',
128 'shell/shell_login_dialog_mac.mm',
129 'shell/shell_login_dialog.cc',
130 'shell/shell_login_dialog.h',
131 'shell/shell_message_filter.cc',
132 'shell/shell_message_filter.h',
133 'shell/shell_network_delegate.cc',
134 'shell/shell_network_delegate.h',
135 'shell/shell_plugin_service_filter.cc',
136 'shell/shell_plugin_service_filter.h',
137 'shell/shell_quota_permission_context.cc',
138 'shell/shell_quota_permission_context.h',
139 'shell/shell_resource_dispatcher_host_delegate.cc',
140 'shell/shell_resource_dispatcher_host_delegate.h',
141 'shell/shell_url_request_context_getter.cc',
142 'shell/shell_url_request_context_getter.h',
143 'shell/shell_web_contents_view_delegate_android.cc',
144 'shell/shell_web_contents_view_delegate_creator.h',
145 'shell/shell_web_contents_view_delegate_gtk.cc',
146 'shell/shell_web_contents_view_delegate_mac.mm',
147 'shell/shell_web_contents_view_delegate_win.cc',
148 'shell/shell_web_contents_view_delegate.h',
149 'shell/webkit_test_controller.cc',
150 'shell/webkit_test_controller.h',
151 'shell/webkit_test_platform_support.h',
152 'shell/webkit_test_platform_support_android.cc',
153 'shell/webkit_test_platform_support_linux.cc',
154 'shell/webkit_test_platform_support_mac.mm',
155 'shell/webkit_test_platform_support_win.cc',
159 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
163 ['OS=="win" and win_use_allocator_shim==1', {
165 '../base/allocator/allocator.gyp:allocator',
169 'resource_include_dirs': [
170 '<(SHARED_INTERMEDIATE_DIR)/webkit',
173 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
179 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
184 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
185 'msvs_disabled_warnings': [ 4267, ],
189 '../build/linux/system.gyp:fontconfig',
194 'content_shell_jni_headers',
196 }, { # else: OS!="android"
198 # This dependency is for running DRT against the content shell, and
199 # this combination is not yet supported on Android.
200 '../webkit/support/webkit_support.gyp:webkit_support',
203 ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (android_use_tcmalloc==1)', {
205 # This is needed by content/app/content_main_runner.cc
206 '../base/allocator/allocator.gyp:allocator',
211 '../ui/aura/aura.gyp:aura',
212 '../ui/base/strings/ui_strings.gyp:ui_strings',
213 '../ui/views/controls/webview/webview.gyp:webview',
214 '../ui/views/views.gyp:views',
215 '../ui/views/views.gyp:views_test_support',
216 '../ui/ui.gyp:ui_resources',
219 ['exclude', 'shell/shell_gtk.cc'],
220 ['exclude', 'shell/shell_win.cc'],
225 '../chromeos/chromeos.gyp:chromeos',
230 '../ash/ash.gyp:ash',
233 ['use_custom_freetype==1', {
235 '../third_party/freetype2/freetype2.gyp:freetype2',
238 ['enable_plugins==0', {
240 ['exclude', 'shell/shell_plugin_service_filter.cc'],
241 ['exclude', 'shell/shell_plugin_service_filter.h'],
247 'target_name': 'content_shell_resources',
250 'generate_content_shell_resources',
253 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
255 'includes': [ '../build/grit_target.gypi' ],
258 'destination': '<(PRODUCT_DIR)',
260 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
266 'target_name': 'generate_content_shell_resources',
269 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
273 'action_name': 'content_shell_resources',
275 'grit_grd_file': 'shell/shell_resources.grd',
277 'includes': [ '../build/grit_action.gypi' ],
282 # We build a minimal set of resources so WebKit in content_shell has
283 # access to necessary resources.
284 'target_name': 'content_shell_pak',
287 'browser/devtools/devtools_resources.gyp:devtools_resources',
288 'content_resources.gyp:content_resources',
289 'content_shell_resources',
290 '<(DEPTH)/net/net.gyp:net_resources',
291 '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
292 '<(DEPTH)/ui/ui.gyp:ui_resources',
293 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
294 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
297 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
301 'action_name': 'repack_content_shell_pack',
304 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
305 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
306 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
307 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
308 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
309 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
310 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
311 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
312 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
313 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
314 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
321 'action': ['python', '<(repack_path)', '<@(_outputs)',
326 '<(PRODUCT_DIR)/content_shell.pak',
330 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
338 'target_name': 'content_shell',
339 'type': 'executable',
341 'defines!': ['CONTENT_IMPLEMENTATION'],
348 '../third_party/mesa/mesa.gyp:osmesa',
354 'app/startup_helper_win.cc',
355 'shell/app/shell_main.cc',
357 'mac_bundle_resources': [
358 'shell/app/app.icns',
359 'shell/app/app-Info.plist',
361 # TODO(mark): Come up with a fancier way to do this. It should only
362 # be necessary to list app-Info.plist once, not the three times it is
364 'mac_bundle_resources!': [
365 'shell/app/app-Info.plist',
368 'INFOPLIST_FILE': 'shell/app/app-Info.plist',
372 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
375 'AdditionalManifestFiles': 'shell/app/shell.exe.manifest',
379 ['OS=="win" and win_use_allocator_shim==1', {
381 '../base/allocator/allocator.gyp:allocator',
386 'shell/app/shell.rc',
392 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
398 ['OS == "win" or toolkit_uses_gtk == 1', {
400 '../sandbox/sandbox.gyp:sandbox',
402 }], # OS=="win" or toolkit_uses_gtk == 1
403 ['toolkit_uses_gtk == 1', {
405 '<(DEPTH)/build/linux/system.gyp:gtk',
407 }], # toolkit_uses_gtk
409 'product_name': '<(content_shell_product_name)',
414 'content_shell_framework',
415 'content_shell_helper_app',
419 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
421 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
427 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
429 '../build/mac/copy_framework_unversioned.sh',
430 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
431 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
435 'postbuild_name': 'Fix Framework Link',
439 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
440 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
441 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
445 # Modify the Info.plist as needed.
446 'postbuild_name': 'Tweak Info.plist',
447 'action': ['../build/mac/tweak_info_plist.py',
449 '--version=<(content_shell_version)'],
452 # This postbuid step is responsible for creating the following
455 # Content Shell Helper EH.app and Content Shell Helper NP.app are
456 # created from Content Shell Helper.app.
458 # The EH helper is marked for an executable heap. The NP helper
459 # is marked for no PIE (ASLR).
460 'postbuild_name': 'Make More Helpers',
462 '../build/mac/make_more_helpers.sh',
464 '<(content_shell_product_name)',
468 # Make sure there isn't any Objective-C in the shell's
470 'postbuild_name': 'Verify No Objective-C',
472 '../build/mac/verify_no_objc.sh',
480 'target_name': 'content_shell_builder',
491 'target_name': 'content_shell_framework',
492 'type': 'shared_library',
493 'product_name': '<(content_shell_product_name) Framework',
495 'mac_bundle_resources': [
496 'shell/app/English.lproj/HttpAuth.xib',
497 'shell/app/English.lproj/MainMenu.xib',
498 '<(PRODUCT_DIR)/content_shell.pak'
507 'shell/shell_content_main.cc',
508 'shell/shell_content_main.h',
512 # Copy FFmpeg binaries for audio/video support.
513 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
515 '<(PRODUCT_DIR)/ffmpegsumo.so',
520 ['enable_webrtc==1', {
522 'libpeer_target_type%': 'static_library',
525 ['libpeer_target_type!="static_library"', {
527 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
529 '<(PRODUCT_DIR)/libpeerconnection.so',
536 }, # target content_shell_framework
538 'target_name': 'content_shell_helper_app',
539 'type': 'executable',
540 'variables': { 'enable_wexit_time_destructors': 1, },
541 'product_name': '<(content_shell_product_name) Helper',
544 'content_shell_framework',
547 'shell/app/shell_main.cc',
548 'shell/app/helper-Info.plist',
550 # TODO(mark): Come up with a fancier way to do this. It should only
551 # be necessary to list helper-Info.plist once, not the three times it
553 'mac_bundle_resources!': [
554 'shell/app/helper-Info.plist',
556 # TODO(mark): For now, don't put any resources into this app. Its
557 # resources directory will be a symbolic link to the browser app's
558 # resources directory.
559 'mac_bundle_resources/': [
563 'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
567 # The framework defines its load-time path
568 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
569 # (chrome). A different relative path needs to be used in
570 # content_shell_helper_app.
571 'postbuild_name': 'Fix Framework Link',
575 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
576 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
577 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
581 # Modify the Info.plist as needed. The script explains why this
582 # is needed. This is also done in the chrome and chrome_dll
583 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
584 # are used because Breakpad, Keystone, and SCM keys are
585 # never placed into the helper.
586 'postbuild_name': 'Tweak Info.plist',
587 'action': ['../build/mac/tweak_info_plist.py',
591 '--version=<(content_shell_version)'],
594 # Make sure there isn't any Objective-C in the helper app's
596 'postbuild_name': 'Verify No Objective-C',
598 '../build/mac/verify_no_objc.sh',
603 ['component=="shared_library"', {
605 'LD_RUNPATH_SEARCH_PATHS': [
606 # Get back from Content Shell.app/Contents/Frameworks/
607 # Helper.app/Contents/MacOS
608 '@loader_path/../../../../../..',
613 }, # target content_shell_helper_app
619 # TODO(jrg): Update this action and other jni generators to only
620 # require specifying the java directory and generate the rest.
621 'target_name': 'content_shell_jni_headers',
624 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
625 'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
626 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
627 'shell/android/java/src/org/chromium/content_shell/Shell.java',
629 'direct_dependent_settings': {
631 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
635 'jni_gen_package': 'content/shell',
637 'includes': [ '../build/jni_generator.gypi' ],
640 'target_name': 'libcontent_shell_content_view',
641 'type': 'shared_library',
643 'content_shell_jni_headers',
646 # Skia is necessary to ensure the dependencies needed by
647 # WebContents are included.
648 '../skia/skia.gyp:skia',
649 '<(DEPTH)/media/media.gyp:player_android',
652 'shell/android/shell_library_loader.cc',
653 'shell/android/shell_library_loader.h',
656 ['android_webview_build==1', {
658 '-lgabi++', # For rtti
664 'target_name': 'content_shell_java',
670 'java_in_dir': '../content/shell/android/java',
671 'has_java_resources': 1,
672 'R_package': 'org.chromium.content_shell',
673 'R_package_relpath': 'org/chromium/content_shell',
675 'includes': [ '../build/java.gypi' ],
678 # content_shell_apk creates a .jar as a side effect. Any java targets
679 # that need that .jar in their classpath should depend on this target,
680 # content_shell_apk_java. Dependents of content_shell_apk receive its
681 # jar path in the variable 'apk_output_jar_path'. This target should
682 # only be used by targets which instrument content_shell_apk.
683 'target_name': 'content_shell_apk_java',
688 'includes': [ '../build/apk_fake_jar.gypi' ],
691 'target_name': 'content_shell_apk',
695 'content_java_test_support',
696 'content_shell_java',
697 'libcontent_shell_content_view',
698 '../base/base.gyp:base_java',
699 '../media/media.gyp:media_java',
700 '../net/net.gyp:net_java',
701 '../ui/ui.gyp:ui_java',
704 'apk_name': 'ContentShell',
705 'manifest_package_name': 'org.chromium.content_shell_apk',
706 'java_in_dir': 'shell/android/shell_apk',
707 'resource_dir': 'shell/android/shell_apk/res',
708 'native_lib_target': 'libcontent_shell_content_view',
709 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
710 'asset_location': '<(ant_build_out)/content_shell/assets',
712 'includes': [ '../build/java_apk.gypi' ],