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/common/webkit_common.gyp:webkit_common',
55 '../webkit/webkit_resources.gyp:webkit_resources',
56 '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent',
57 '../webkit/support/webkit_support.gyp:glue',
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/paths_mac.h',
68 'shell/app/paths_mac.mm',
69 'shell/app/shell_main_delegate.cc',
70 'shell/app/shell_main_delegate.h',
71 'shell/app/shell_main_delegate_mac.h',
72 'shell/app/shell_main_delegate_mac.mm',
73 'shell/app/webkit_test_platform_support_android.cc',
74 'shell/app/webkit_test_platform_support.h',
75 'shell/app/webkit_test_platform_support_linux.cc',
76 'shell/app/webkit_test_platform_support_mac.mm',
77 'shell/app/webkit_test_platform_support_win.cc',
78 'shell/browser/minimal_shell.cc',
79 'shell/browser/minimal_shell.h',
80 'shell/browser/notify_done_forwarder.cc',
81 'shell/browser/notify_done_forwarder.h',
82 'shell/browser/shell_android.cc',
83 'shell/browser/shell_application_mac.h',
84 'shell/browser/shell_application_mac.mm',
85 'shell/browser/shell_aura.cc',
86 'shell/browser/shell_browser_context.cc',
87 'shell/browser/shell_browser_context.h',
88 'shell/browser/shell_browser_main.cc',
89 'shell/browser/shell_browser_main.h',
90 'shell/browser/shell_browser_main_parts.cc',
91 'shell/browser/shell_browser_main_parts.h',
92 'shell/browser/shell_browser_main_parts_mac.mm',
93 'shell/browser/shell.cc',
94 'shell/browser/shell_content_browser_client.cc',
95 'shell/browser/shell_content_browser_client.h',
96 'shell/browser/shell_devtools_delegate.cc',
97 'shell/browser/shell_devtools_delegate.h',
98 'shell/browser/shell_devtools_frontend.cc',
99 'shell/browser/shell_devtools_frontend.h',
100 'shell/browser/shell_download_manager_delegate.cc',
101 'shell/browser/shell_download_manager_delegate.h',
102 'shell/browser/shell_gtk.cc',
103 'shell/browser/shell.h',
104 'shell/browser/shell_javascript_dialog_gtk.cc',
105 'shell/browser/shell_javascript_dialog.h',
106 'shell/browser/shell_javascript_dialog_mac.mm',
107 'shell/browser/shell_javascript_dialog_manager.cc',
108 'shell/browser/shell_javascript_dialog_manager.h',
109 'shell/browser/shell_javascript_dialog_win.cc',
110 'shell/browser/shell_layout_tests_android.cc',
111 'shell/browser/shell_layout_tests_android.h',
112 'shell/browser/shell_login_dialog.cc',
113 'shell/browser/shell_login_dialog_gtk.cc',
114 'shell/browser/shell_login_dialog.h',
115 'shell/browser/shell_login_dialog_mac.mm',
116 'shell/browser/shell_mac.mm',
117 'shell/browser/shell_message_filter.cc',
118 'shell/browser/shell_message_filter.h',
119 'shell/browser/shell_net_log.cc',
120 'shell/browser/shell_net_log.h',
121 'shell/browser/shell_network_delegate.cc',
122 'shell/browser/shell_network_delegate.h',
123 'shell/browser/shell_plugin_service_filter.cc',
124 'shell/browser/shell_plugin_service_filter.h',
125 'shell/browser/shell_quota_permission_context.cc',
126 'shell/browser/shell_quota_permission_context.h',
127 'shell/browser/shell_resource_dispatcher_host_delegate.cc',
128 'shell/browser/shell_resource_dispatcher_host_delegate.h',
129 'shell/browser/shell_speech_recognition_manager_delegate.cc',
130 'shell/browser/shell_speech_recognition_manager_delegate.h',
131 'shell/browser/shell_url_request_context_getter.cc',
132 'shell/browser/shell_url_request_context_getter.h',
133 'shell/browser/shell_web_contents_view_delegate_android.cc',
134 'shell/browser/shell_web_contents_view_delegate_creator.h',
135 'shell/browser/shell_web_contents_view_delegate_gtk.cc',
136 'shell/browser/shell_web_contents_view_delegate.h',
137 'shell/browser/shell_web_contents_view_delegate_mac.mm',
138 'shell/browser/shell_web_contents_view_delegate_win.cc',
139 'shell/browser/shell_win.cc',
140 'shell/browser/webkit_test_controller.cc',
141 'shell/browser/webkit_test_controller.h',
142 'shell/common/shell_content_client.cc',
143 'shell/common/shell_content_client.h',
144 'shell/common/shell_messages.cc',
145 'shell/common/shell_messages.h',
146 'shell/common/shell_switches.cc',
147 'shell/common/shell_switches.h',
148 'shell/common/shell_test_configuration.cc',
149 'shell/common/shell_test_configuration.h',
150 'shell/common/webkit_test_helpers.cc',
151 'shell/common/webkit_test_helpers.h',
152 'shell/geolocation/shell_access_token_store.cc',
153 'shell/geolocation/shell_access_token_store.h',
154 'shell/renderer/gc_extension.cc',
155 'shell/renderer/gc_extension.h',
156 'shell/renderer/shell_content_renderer_client.cc',
157 'shell/renderer/shell_content_renderer_client.h',
158 'shell/renderer/shell_render_process_observer.cc',
159 'shell/renderer/shell_render_process_observer.h',
160 'shell/renderer/shell_render_view_observer.cc',
161 'shell/renderer/shell_render_view_observer.h',
162 'shell/renderer/webkit_test_runner.cc',
163 'shell/renderer/webkit_test_runner.h',
167 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
171 ['OS=="win" and win_use_allocator_shim==1', {
173 '../base/allocator/allocator.gyp:allocator',
177 'resource_include_dirs': [
178 '<(SHARED_INTERMEDIATE_DIR)/webkit',
181 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
187 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
192 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
193 'msvs_disabled_warnings': [ 4267, ],
197 '../build/linux/system.gyp:fontconfig',
202 'content_shell_jni_headers',
204 }, { # else: OS!="android"
206 # This dependency is for running DRT against the content shell, and
207 # this combination is not yet supported on Android.
208 'test_support_content',
211 ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (android_use_tcmalloc==1)', {
213 # This is needed by content/app/content_main_runner.cc
214 '../base/allocator/allocator.gyp:allocator',
219 '../ui/aura/aura.gyp:aura',
220 '../ui/base/strings/ui_strings.gyp:ui_strings',
221 '../ui/views/controls/webview/webview.gyp:webview',
222 '../ui/views/views.gyp:views',
223 '../ui/views/views.gyp:views_test_support',
224 '../ui/ui.gyp:ui_resources',
227 ['exclude', 'shell/browser/shell_gtk.cc'],
228 ['exclude', 'shell/browser/shell_win.cc'],
233 '../chromeos/chromeos.gyp:chromeos',
238 '../ash/ash.gyp:ash',
241 ['use_custom_freetype==1', {
243 '../third_party/freetype2/freetype2.gyp:freetype2',
246 ['enable_plugins==0', {
248 ['exclude', 'shell/browser/shell_plugin_service_filter.cc'],
249 ['exclude', 'shell/browser/shell_plugin_service_filter.h'],
255 'target_name': 'content_shell_resources',
258 'generate_content_shell_resources',
261 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
263 'includes': [ '../build/grit_target.gypi' ],
266 'destination': '<(PRODUCT_DIR)',
268 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
274 'target_name': 'generate_content_shell_resources',
277 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
281 'action_name': 'content_shell_resources',
283 'grit_grd_file': 'shell/shell_resources.grd',
285 'includes': [ '../build/grit_action.gypi' ],
290 # We build a minimal set of resources so WebKit in content_shell has
291 # access to necessary resources.
292 'target_name': 'content_shell_pak',
295 'browser/devtools/devtools_resources.gyp:devtools_resources',
296 'content_resources.gyp:content_resources',
297 'content_shell_resources',
298 '<(DEPTH)/net/net.gyp:net_resources',
299 '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
300 '<(DEPTH)/ui/ui.gyp:ui_resources',
301 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
302 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
305 ['OS!="android" and OS!="ios"', {
307 'browser/tracing/tracing_resources.gyp:tracing_resources',
312 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
316 'action_name': 'repack_content_shell_pack',
319 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
320 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
321 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
322 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
323 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
324 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
325 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
326 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
327 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
328 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
329 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
330 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
337 'action': ['python', '<(repack_path)', '<@(_outputs)',
342 '<(PRODUCT_DIR)/content_shell.pak',
346 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
354 'target_name': 'content_shell',
355 'type': 'executable',
357 'defines!': ['CONTENT_IMPLEMENTATION'],
364 '../third_party/mesa/mesa.gyp:osmesa',
365 '../tools/imagediff/image_diff.gyp:image_diff',
371 'app/startup_helper_win.cc',
372 'shell/app/shell_main.cc',
374 'mac_bundle_resources': [
375 'shell/app/app.icns',
376 'shell/app/app-Info.plist',
378 # TODO(mark): Come up with a fancier way to do this. It should only
379 # be necessary to list app-Info.plist once, not the three times it is
381 'mac_bundle_resources!': [
382 'shell/app/app-Info.plist',
385 'INFOPLIST_FILE': 'shell/app/app-Info.plist',
389 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
392 'AdditionalManifestFiles': [
393 'shell/app/shell.exe.manifest',
398 ['OS=="win" and win_use_allocator_shim==1', {
400 '../base/allocator/allocator.gyp:allocator',
405 'shell/app/shell.rc',
411 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
417 ['OS == "win" or toolkit_uses_gtk == 1', {
419 '../sandbox/sandbox.gyp:sandbox',
421 }], # OS=="win" or toolkit_uses_gtk == 1
422 ['toolkit_uses_gtk == 1', {
424 '<(DEPTH)/build/linux/system.gyp:gtk',
426 }], # toolkit_uses_gtk
428 'product_name': '<(content_shell_product_name)',
433 'content_shell_framework',
434 'content_shell_helper_app',
438 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
440 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
446 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
448 '../build/mac/copy_framework_unversioned.sh',
449 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
450 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
454 'postbuild_name': 'Fix Framework Link',
458 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
459 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
460 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
464 # Modify the Info.plist as needed.
465 'postbuild_name': 'Tweak Info.plist',
466 'action': ['../build/mac/tweak_info_plist.py',
468 '--version=<(content_shell_version)'],
471 # This postbuid step is responsible for creating the following
474 # Content Shell Helper EH.app and Content Shell Helper NP.app are
475 # created from Content Shell Helper.app.
477 # The EH helper is marked for an executable heap. The NP helper
478 # is marked for no PIE (ASLR).
479 'postbuild_name': 'Make More Helpers',
481 '../build/mac/make_more_helpers.sh',
483 '<(content_shell_product_name)',
487 # Make sure there isn't any Objective-C in the shell's
489 'postbuild_name': 'Verify No Objective-C',
491 '../build/mac/verify_no_objc.sh',
498 '../tools/imagediff/image_diff.gyp:image_diff',
501 ['OS=="android" and android_webview_build==0', {
503 '../tools/imagediff/image_diff.gyp:image_diff#host',
505 }], # OS=="android" and android_webview_build==0
509 'target_name': 'content_shell_builder',
520 'target_name': 'content_shell_framework',
521 'type': 'shared_library',
522 'product_name': '<(content_shell_product_name) Framework',
524 'mac_bundle_resources': [
525 'shell/app/English.lproj/HttpAuth.xib',
526 'shell/app/English.lproj/MainMenu.xib',
527 '<(PRODUCT_DIR)/content_shell.pak'
536 'shell/app/shell_content_main.cc',
537 'shell/app/shell_content_main.h',
541 # Copy FFmpeg binaries for audio/video support.
542 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
544 '<(PRODUCT_DIR)/ffmpegsumo.so',
549 ['enable_webrtc==1', {
551 'libpeer_target_type%': 'static_library',
554 ['libpeer_target_type!="static_library"', {
556 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
558 '<(PRODUCT_DIR)/libpeerconnection.so',
565 }, # target content_shell_framework
567 'target_name': 'content_shell_helper_app',
568 'type': 'executable',
569 'variables': { 'enable_wexit_time_destructors': 1, },
570 'product_name': '<(content_shell_product_name) Helper',
573 'content_shell_framework',
576 'shell/app/shell_main.cc',
577 'shell/app/helper-Info.plist',
579 # TODO(mark): Come up with a fancier way to do this. It should only
580 # be necessary to list helper-Info.plist once, not the three times it
582 'mac_bundle_resources!': [
583 'shell/app/helper-Info.plist',
585 # TODO(mark): For now, don't put any resources into this app. Its
586 # resources directory will be a symbolic link to the browser app's
587 # resources directory.
588 'mac_bundle_resources/': [
592 'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
596 # The framework defines its load-time path
597 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
598 # (chrome). A different relative path needs to be used in
599 # content_shell_helper_app.
600 'postbuild_name': 'Fix Framework Link',
604 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
605 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
606 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
610 # Modify the Info.plist as needed. The script explains why this
611 # is needed. This is also done in the chrome and chrome_dll
612 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
613 # are used because Breakpad, Keystone, and SCM keys are
614 # never placed into the helper.
615 'postbuild_name': 'Tweak Info.plist',
616 'action': ['../build/mac/tweak_info_plist.py',
620 '--version=<(content_shell_version)'],
623 # Make sure there isn't any Objective-C in the helper app's
625 'postbuild_name': 'Verify No Objective-C',
627 '../build/mac/verify_no_objc.sh',
632 ['component=="shared_library"', {
634 'LD_RUNPATH_SEARCH_PATHS': [
635 # Get back from Content Shell.app/Contents/Frameworks/
636 # Helper.app/Contents/MacOS
637 '@loader_path/../../../../../..',
642 }, # target content_shell_helper_app
648 # TODO(jrg): Update this action and other jni generators to only
649 # require specifying the java directory and generate the rest.
650 'target_name': 'content_shell_jni_headers',
653 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
654 'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
655 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
656 'shell/android/java/src/org/chromium/content_shell/Shell.java',
658 'direct_dependent_settings': {
660 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
664 'jni_gen_package': 'content/shell',
666 'includes': [ '../build/jni_generator.gypi' ],
669 'target_name': 'libcontent_shell_content_view',
670 'type': 'shared_library',
672 'content_shell_jni_headers',
675 # Skia is necessary to ensure the dependencies needed by
676 # WebContents are included.
677 '../skia/skia.gyp:skia',
678 '<(DEPTH)/media/media.gyp:player_android',
681 'shell/android/shell_library_loader.cc',
682 'shell/android/shell_library_loader.h',
685 ['android_webview_build==1', {
687 '-lgabi++', # For rtti
693 'target_name': 'content_shell_java',
699 'java_in_dir': '../content/shell/android/java',
700 'has_java_resources': 1,
701 'R_package': 'org.chromium.content_shell',
702 'R_package_relpath': 'org/chromium/content_shell',
704 'includes': [ '../build/java.gypi' ],
707 # content_shell_apk creates a .jar as a side effect. Any java targets
708 # that need that .jar in their classpath should depend on this target,
709 # content_shell_apk_java. Dependents of content_shell_apk receive its
710 # jar path in the variable 'apk_output_jar_path'. This target should
711 # only be used by targets which instrument content_shell_apk.
712 'target_name': 'content_shell_apk_java',
717 'includes': [ '../build/apk_fake_jar.gypi' ],
720 'target_name': 'content_shell_apk',
724 'content_java_test_support',
725 'content_shell_java',
726 'libcontent_shell_content_view',
727 '../base/base.gyp:base_java',
728 '../media/media.gyp:media_java',
729 '../net/net.gyp:net_java',
730 '../tools/android/forwarder/forwarder.gyp:forwarder',
731 '../ui/ui.gyp:ui_java',
734 'apk_name': 'ContentShell',
735 'manifest_package_name': 'org.chromium.content_shell_apk',
736 'java_in_dir': 'shell/android/shell_apk',
737 'resource_dir': 'shell/android/shell_apk/res',
738 'native_lib_target': 'libcontent_shell_content_view',
739 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
740 'asset_location': '<(ant_build_out)/content_shell/assets',
743 ['android_webview_build==0', {
745 '../tools/imagediff/image_diff.gyp:image_diff#host',
749 'includes': [ '../build/java_apk.gypi' ],