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',
44 '../build/temp_gyp/googleurl.gyp:googleurl',
46 '../media/media.gyp:media',
48 '../net/net.gyp:net_resources',
49 '../skia/skia.gyp:skia',
52 '../v8/tools/gyp/v8.gyp:v8',
53 '../webkit/support/webkit_support.gyp:webkit_resources',
54 '../webkit/support/webkit_support.gyp:webkit_support',
55 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
56 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
57 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner',
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/geolocation/shell_access_token_store.cc',
68 'shell/geolocation/shell_access_token_store.h',
69 'shell/minimal_ash.cc',
70 'shell/minimal_ash.h',
71 'shell/notify_done_forwarder.cc',
72 'shell/notify_done_forwarder.h',
77 'shell/shell_android.cc',
78 'shell/shell_aura.cc',
82 'shell/shell_application_mac.h',
83 'shell/shell_application_mac.mm',
84 'shell/shell_browser_context.cc',
85 'shell/shell_browser_context.h',
86 'shell/shell_browser_main.cc',
87 'shell/shell_browser_main.h',
88 'shell/shell_browser_main_parts.cc',
89 'shell/shell_browser_main_parts.h',
90 'shell/shell_browser_main_parts_mac.mm',
91 'shell/shell_content_browser_client.cc',
92 'shell/shell_content_browser_client.h',
93 'shell/shell_content_client.cc',
94 'shell/shell_content_client.h',
95 'shell/shell_content_renderer_client.cc',
96 'shell/shell_content_renderer_client.h',
97 'shell/shell_devtools_delegate.cc',
98 'shell/shell_devtools_delegate.h',
99 'shell/shell_devtools_frontend.cc',
100 'shell/shell_devtools_frontend.h',
101 'shell/shell_download_manager_delegate.cc',
102 'shell/shell_download_manager_delegate.h',
103 'shell/shell_javascript_dialog_manager.cc',
104 'shell/shell_javascript_dialog_manager.h',
105 'shell/shell_javascript_dialog_gtk.cc',
106 'shell/shell_javascript_dialog_mac.mm',
107 'shell/shell_javascript_dialog_win.cc',
108 'shell/shell_javascript_dialog.h',
109 'shell/shell_login_dialog_gtk.cc',
110 'shell/shell_login_dialog_mac.mm',
111 'shell/shell_login_dialog.cc',
112 'shell/shell_login_dialog.h',
113 'shell/shell_main_delegate.cc',
114 'shell/shell_main_delegate.h',
115 'shell/shell_message_filter.cc',
116 'shell/shell_message_filter.h',
117 'shell/shell_messages.cc',
118 'shell/shell_messages.h',
119 'shell/shell_network_delegate.cc',
120 'shell/shell_network_delegate.h',
121 'shell/shell_quota_permission_context.cc',
122 'shell/shell_quota_permission_context.h',
123 'shell/shell_render_process_observer.cc',
124 'shell/shell_render_process_observer.h',
125 'shell/shell_resource_dispatcher_host_delegate.cc',
126 'shell/shell_resource_dispatcher_host_delegate.h',
127 'shell/shell_switches.cc',
128 'shell/shell_switches.h',
129 'shell/shell_test_configuration.cc',
130 'shell/shell_test_configuration.h',
131 'shell/shell_url_request_context_getter.cc',
132 'shell/shell_url_request_context_getter.h',
133 'shell/shell_web_contents_view_delegate_android.cc',
134 'shell/shell_web_contents_view_delegate_creator.h',
135 'shell/shell_web_contents_view_delegate_gtk.cc',
136 'shell/shell_web_contents_view_delegate_mac.mm',
137 'shell/shell_web_contents_view_delegate_win.cc',
138 'shell/shell_web_contents_view_delegate.h',
139 'shell/webkit_test_controller.cc',
140 'shell/webkit_test_controller.h',
141 'shell/webkit_test_helpers.cc',
142 'shell/webkit_test_helpers.h',
143 'shell/webkit_test_platform_support.h',
144 'shell/webkit_test_platform_support_android.cc',
145 'shell/webkit_test_platform_support_linux.cc',
146 'shell/webkit_test_platform_support_mac.mm',
147 'shell/webkit_test_platform_support_win.cc',
148 'shell/webkit_test_runner.cc',
149 'shell/webkit_test_runner.h',
153 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
157 ['OS=="win" and win_use_allocator_shim==1', {
159 '../base/allocator/allocator.gyp:allocator',
163 'resource_include_dirs': [
164 '<(SHARED_INTERMEDIATE_DIR)/webkit',
167 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
173 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
178 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
179 'msvs_disabled_warnings': [ 4267, ],
183 '../build/linux/system.gyp:fontconfig',
188 'content_shell_jni_headers',
190 }, { # else: OS!="android"
192 # This dependency is for running DRT against the content shell, and
193 # this combination is not yet supported on Android.
194 '../webkit/support/webkit_support.gyp:webkit_support',
197 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
199 # This is needed by content/app/content_main_runner.cc
200 '../base/allocator/allocator.gyp:allocator',
205 '../ui/aura/aura.gyp:aura',
206 '../ui/base/strings/ui_strings.gyp:ui_strings',
207 '../ui/views/controls/webview/webview.gyp:webview',
208 '../ui/views/views.gyp:views',
209 '../ui/views/views.gyp:views_test_support',
210 '../ui/ui.gyp:ui_resources',
213 ['exclude', 'shell/shell_gtk.cc'],
214 ['exclude', 'shell/shell_win.cc'],
219 '../ash/ash.gyp:ash',
220 '../chromeos/chromeos.gyp:chromeos',
223 ['use_custom_freetype==1', {
225 '../third_party/freetype2/freetype2.gyp:freetype2',
231 'target_name': 'content_shell_resources',
234 'generate_content_shell_resources',
237 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
239 'includes': [ '../build/grit_target.gypi' ],
242 'destination': '<(PRODUCT_DIR)',
244 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
250 'target_name': 'generate_content_shell_resources',
253 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
257 'action_name': 'content_shell_resources',
259 'grit_grd_file': 'shell/shell_resources.grd',
261 'includes': [ '../build/grit_action.gypi' ],
266 # We build a minimal set of resources so WebKit in content_shell has
267 # access to necessary resources.
268 'target_name': 'content_shell_pak',
271 'browser/devtools/devtools_resources.gyp:devtools_resources',
272 'content_shell_resources',
273 '<(DEPTH)/ui/ui.gyp:ui_resources',
276 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
280 'action_name': 'repack_content_shell_pack',
283 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
284 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
285 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
286 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
287 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
288 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
289 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
290 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
291 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
292 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
293 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
300 'action': ['python', '<(repack_path)', '<@(_outputs)',
305 '<(PRODUCT_DIR)/content_shell.pak',
309 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
317 'target_name': 'content_shell',
318 'type': 'executable',
320 'defines!': ['CONTENT_IMPLEMENTATION'],
327 '../third_party/mesa/mesa.gyp:osmesa',
333 'app/startup_helper_win.cc',
334 'shell/shell_main.cc',
336 'mac_bundle_resources': [
337 'shell/mac/app.icns',
338 'shell/mac/app-Info.plist',
340 # TODO(mark): Come up with a fancier way to do this. It should only
341 # be necessary to list app-Info.plist once, not the three times it is
343 'mac_bundle_resources!': [
344 'shell/mac/app-Info.plist',
347 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
351 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
355 ['OS=="win" and win_use_allocator_shim==1', {
357 '../base/allocator/allocator.gyp:allocator',
368 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
374 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
376 '../sandbox/sandbox.gyp:sandbox',
378 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
379 ['toolkit_uses_gtk == 1', {
381 '<(DEPTH)/build/linux/system.gyp:gtk',
383 }], # toolkit_uses_gtk
385 'product_name': '<(content_shell_product_name)',
390 'content_shell_framework',
391 'content_shell_helper_app',
395 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
397 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
403 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
405 '../build/mac/copy_framework_unversioned.sh',
406 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
407 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
411 'postbuild_name': 'Fix Framework Link',
415 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
416 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
417 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
421 # Modify the Info.plist as needed.
422 'postbuild_name': 'Tweak Info.plist',
423 'action': ['../build/mac/tweak_info_plist.py',
425 '--version=<(content_shell_version)'],
428 # This postbuid step is responsible for creating the following
431 # Content Shell Helper EH.app and Content Shell Helper NP.app are
432 # created from Content Shell Helper.app.
434 # The EH helper is marked for an executable heap. The NP helper
435 # is marked for no PIE (ASLR).
436 'postbuild_name': 'Make More Helpers',
438 '../build/mac/make_more_helpers.sh',
440 '<(content_shell_product_name)',
444 # Make sure there isn't any Objective-C in the shell's
446 'postbuild_name': 'Verify No Objective-C',
448 '../build/mac/verify_no_objc.sh',
456 'target_name': 'content_shell_builder',
467 'target_name': 'content_shell_framework',
468 'type': 'shared_library',
469 'product_name': '<(content_shell_product_name) Framework',
471 'mac_bundle_resources': [
472 'shell/mac/English.lproj/HttpAuth.xib',
473 'shell/mac/English.lproj/MainMenu.xib',
474 '<(PRODUCT_DIR)/content_shell.pak'
483 'shell/shell_content_main.cc',
484 'shell/shell_content_main.h',
488 # Copy FFmpeg binaries for audio/video support.
489 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
491 '<(PRODUCT_DIR)/ffmpegsumo.so',
496 ['enable_webrtc==1', {
498 'libpeer_target_type%': 'static_library',
501 ['libpeer_target_type=="shared_library"', {
503 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
505 '<(PRODUCT_DIR)/Libraries/libpeerconnection.dylib',
512 }, # target content_shell_framework
514 'target_name': 'content_shell_helper_app',
515 'type': 'executable',
516 'variables': { 'enable_wexit_time_destructors': 1, },
517 'product_name': '<(content_shell_product_name) Helper',
520 'content_shell_framework',
523 'shell/shell_main.cc',
524 'shell/mac/helper-Info.plist',
526 # TODO(mark): Come up with a fancier way to do this. It should only
527 # be necessary to list helper-Info.plist once, not the three times it
529 'mac_bundle_resources!': [
530 'shell/mac/helper-Info.plist',
532 # TODO(mark): For now, don't put any resources into this app. Its
533 # resources directory will be a symbolic link to the browser app's
534 # resources directory.
535 'mac_bundle_resources/': [
539 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
543 # The framework defines its load-time path
544 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
545 # (chrome). A different relative path needs to be used in
546 # content_shell_helper_app.
547 'postbuild_name': 'Fix Framework Link',
551 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
552 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
553 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
557 # Modify the Info.plist as needed. The script explains why this
558 # is needed. This is also done in the chrome and chrome_dll
559 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
560 # are used because Breakpad, Keystone, and SCM keys are
561 # never placed into the helper.
562 'postbuild_name': 'Tweak Info.plist',
563 'action': ['../build/mac/tweak_info_plist.py',
567 '--version=<(content_shell_version)'],
570 # Make sure there isn't any Objective-C in the helper app's
572 'postbuild_name': 'Verify No Objective-C',
574 '../build/mac/verify_no_objc.sh',
579 ['component=="shared_library"', {
581 'LD_RUNPATH_SEARCH_PATHS': [
582 # Get back from Content Shell.app/Contents/Frameworks/
583 # Helper.app/Contents/MacOS
584 '@loader_path/../../../../../..',
589 }, # target content_shell_helper_app
595 # TODO(jrg): Update this action and other jni generators to only
596 # require specifying the java directory and generate the rest.
597 'target_name': 'content_shell_jni_headers',
600 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/BrowserTestSystemMessageHandler.java',
601 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
602 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
603 'shell/android/java/src/org/chromium/content_shell/Shell.java',
605 'direct_dependent_settings': {
607 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
611 'jni_gen_package': 'content/shell',
613 'includes': [ '../build/jni_generator.gypi' ],
616 'target_name': 'libcontent_shell_content_view',
617 'type': 'shared_library',
619 'content_shell_jni_headers',
622 # Skia is necessary to ensure the dependencies needed by
623 # WebContents are included.
624 '../skia/skia.gyp:skia',
625 '<(DEPTH)/media/media.gyp:player_android',
628 'shell/android/shell_library_loader.cc',
629 'shell/android/shell_library_loader.h',
632 ['android_webview_build==1', {
634 '-lgabi++', # For rtti
640 'target_name': 'content_shell_java',
646 'java_in_dir': '../content/shell/android/java',
647 'has_java_resources': 1,
648 'R_package': 'org.chromium.content_shell',
649 'R_package_relpath': 'org/chromium/content_shell',
651 'includes': [ '../build/java.gypi' ],
654 # content_shell_apk creates a .jar as a side effect. Any java targets
655 # that need that .jar in their classpath should depend on this target,
656 # content_shell_apk_java. Dependents of content_shell_apk receive its
657 # jar path in the variable 'apk_output_jar_path'. This target should
658 # only be used by targets which instrument content_shell_apk.
659 'target_name': 'content_shell_apk_java',
664 'includes': [ '../build/apk_fake_jar.gypi' ],
667 'target_name': 'content_shell_apk',
671 'content_shell_java',
672 'libcontent_shell_content_view',
673 '../base/base.gyp:base_java',
674 '../media/media.gyp:media_java',
675 '../net/net.gyp:net_java',
676 '../ui/ui.gyp:ui_java',
679 'apk_name': 'ContentShell',
680 'manifest_package_name': 'org.chromium.content_shell_apk',
681 'java_in_dir': 'shell/android/shell_apk',
682 'resource_dir': 'shell/android/shell_apk/res',
683 'native_lib_target': 'libcontent_shell_content_view',
684 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
685 'asset_location': '<(ant_build_out)/content_shell/assets',
687 'includes': [ '../build/java_apk.gypi' ],