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',
15 'target_name': 'content_shell_lib',
16 'type': 'static_library',
17 'defines!': ['CONTENT_IMPLEMENTATION'],
18 'defines': ['CONTENT_SHELL_VERSION="<(content_shell_version)"'],
28 'content_ppapi_plugin',
30 'content_shell_resources',
33 'test_support_content',
34 'content_resources.gyp:content_resources',
35 '../base/base.gyp:base',
36 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
37 '../build/temp_gyp/googleurl.gyp:googleurl',
39 '../media/media.gyp:media',
41 '../net/net.gyp:net_resources',
42 '../skia/skia.gyp:skia',
45 '../v8/tools/gyp/v8.gyp:v8',
46 '../webkit/support/webkit_support.gyp:webkit_resources',
47 '../webkit/support/webkit_support.gyp:webkit_support',
48 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
49 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
50 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner',
56 'shell/android/shell_jni_registrar.cc',
57 'shell/android/shell_jni_registrar.h',
58 'shell/android/shell_manager.cc',
59 'shell/android/shell_manager.h',
60 'shell/geolocation/shell_access_token_store.cc',
61 'shell/geolocation/shell_access_token_store.h',
62 'shell/minimal_ash.cc',
63 'shell/minimal_ash.h',
68 'shell/shell_android.cc',
69 'shell/shell_aura.cc',
73 'shell/shell_application_mac.h',
74 'shell/shell_application_mac.mm',
75 'shell/shell_browser_context.cc',
76 'shell/shell_browser_context.h',
77 'shell/shell_browser_main.cc',
78 'shell/shell_browser_main.h',
79 'shell/shell_browser_main_parts.cc',
80 'shell/shell_browser_main_parts.h',
81 'shell/shell_browser_main_parts_mac.mm',
82 'shell/shell_content_browser_client.cc',
83 'shell/shell_content_browser_client.h',
84 'shell/shell_content_client.cc',
85 'shell/shell_content_client.h',
86 'shell/shell_content_renderer_client.cc',
87 'shell/shell_content_renderer_client.h',
88 'shell/shell_devtools_delegate.cc',
89 'shell/shell_devtools_delegate.h',
90 'shell/shell_devtools_frontend.cc',
91 'shell/shell_devtools_frontend.h',
92 'shell/shell_download_manager_delegate.cc',
93 'shell/shell_download_manager_delegate.h',
94 'shell/shell_javascript_dialog_manager.cc',
95 'shell/shell_javascript_dialog_manager.h',
96 'shell/shell_javascript_dialog_gtk.cc',
97 'shell/shell_javascript_dialog_mac.mm',
98 'shell/shell_javascript_dialog_win.cc',
99 'shell/shell_javascript_dialog.h',
100 'shell/shell_login_dialog_gtk.cc',
101 'shell/shell_login_dialog_mac.mm',
102 'shell/shell_login_dialog.cc',
103 'shell/shell_login_dialog.h',
104 'shell/shell_main_delegate.cc',
105 'shell/shell_main_delegate.h',
106 'shell/shell_message_filter.cc',
107 'shell/shell_message_filter.h',
108 'shell/shell_messages.cc',
109 'shell/shell_messages.h',
110 'shell/shell_network_delegate.cc',
111 'shell/shell_network_delegate.h',
112 'shell/shell_render_process_observer.cc',
113 'shell/shell_render_process_observer.h',
114 'shell/shell_resource_dispatcher_host_delegate.cc',
115 'shell/shell_resource_dispatcher_host_delegate.h',
116 'shell/shell_switches.cc',
117 'shell/shell_switches.h',
118 'shell/shell_url_request_context_getter.cc',
119 'shell/shell_url_request_context_getter.h',
120 'shell/shell_web_contents_view_delegate_android.cc',
121 'shell/shell_web_contents_view_delegate_creator.h',
122 'shell/shell_web_contents_view_delegate_gtk.cc',
123 'shell/shell_web_contents_view_delegate_mac.mm',
124 'shell/shell_web_contents_view_delegate_win.cc',
125 'shell/shell_web_contents_view_delegate.h',
126 'shell/webkit_test_controller.cc',
127 'shell/webkit_test_controller.h',
128 'shell/webkit_test_helpers.cc',
129 'shell/webkit_test_helpers.h',
130 'shell/webkit_test_platform_support.h',
131 'shell/webkit_test_platform_support_android.cc',
132 'shell/webkit_test_platform_support_linux.cc',
133 'shell/webkit_test_platform_support_mac.mm',
134 'shell/webkit_test_platform_support_win.cc',
135 'shell/webkit_test_runner.cc',
136 'shell/webkit_test_runner.h',
140 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
144 ['OS=="win" and win_use_allocator_shim==1', {
146 '../base/allocator/allocator.gyp:allocator',
150 'resource_include_dirs': [
151 '<(SHARED_INTERMEDIATE_DIR)/webkit',
154 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
160 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
165 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
166 'msvs_disabled_warnings': [ 4267, ],
170 '../build/linux/system.gyp:fontconfig',
175 'content_shell_jni_headers',
177 }, { # else: OS!="android"
179 # This dependency is for running DRT against the content shell, and
180 # this combination is not yet supported on Android.
181 '../webkit/support/webkit_support.gyp:webkit_support',
184 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
186 # This is needed by content/app/content_main_runner.cc
187 '../base/allocator/allocator.gyp:allocator',
192 '../ui/aura/aura.gyp:aura',
193 '../ui/base/strings/ui_strings.gyp:ui_strings',
194 '../ui/views/controls/webview/webview.gyp:webview',
195 '../ui/views/views.gyp:views',
196 '../ui/views/views.gyp:views_test_support',
197 '../ui/ui.gyp:ui_resources',
200 ['exclude', 'shell/shell_gtk.cc'],
201 ['exclude', 'shell/shell_win.cc'],
206 '../ash/ash.gyp:ash',
207 '../chromeos/chromeos.gyp:chromeos',
213 'target_name': 'content_shell_resources',
216 'generate_content_shell_resources',
219 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
221 'includes': [ '../build/grit_target.gypi' ],
224 'destination': '<(PRODUCT_DIR)',
226 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
232 'target_name': 'generate_content_shell_resources',
235 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
239 'action_name': 'content_shell_resources',
241 'grit_grd_file': 'shell/shell_resources.grd',
243 'includes': [ '../build/grit_action.gypi' ],
248 # We build a minimal set of resources so WebKit in content_shell has
249 # access to necessary resources.
250 'target_name': 'content_shell_pak',
253 'browser/devtools/devtools_resources.gyp:devtools_resources',
254 'content_shell_resources',
255 '<(DEPTH)/ui/ui.gyp:ui_resources',
258 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
262 'action_name': 'repack_content_shell_pack',
265 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
266 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
267 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
268 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
269 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
270 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
271 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
272 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
273 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
274 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
275 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
282 'action': ['python', '<(repack_path)', '<@(_outputs)',
287 '<(PRODUCT_DIR)/content_shell.pak',
291 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
299 'target_name': 'content_shell',
300 'type': 'executable',
302 'defines!': ['CONTENT_IMPLEMENTATION'],
309 '../third_party/mesa/mesa.gyp:osmesa',
315 'app/startup_helper_win.cc',
316 'shell/shell_main.cc',
318 'mac_bundle_resources': [
319 'shell/mac/app.icns',
320 'shell/mac/app-Info.plist',
322 # TODO(mark): Come up with a fancier way to do this. It should only
323 # be necessary to list app-Info.plist once, not the three times it is
325 'mac_bundle_resources!': [
326 'shell/mac/app-Info.plist',
329 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
333 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
337 ['OS=="win" and win_use_allocator_shim==1', {
339 '../base/allocator/allocator.gyp:allocator',
350 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
356 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
358 '../sandbox/sandbox.gyp:sandbox',
360 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
361 ['toolkit_uses_gtk == 1', {
363 '<(DEPTH)/build/linux/system.gyp:gtk',
365 }], # toolkit_uses_gtk
367 'product_name': '<(content_shell_product_name)',
372 'content_shell_framework',
373 'content_shell_helper_app',
377 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
379 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
385 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
387 '../build/mac/copy_framework_unversioned.sh',
388 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
389 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
393 'postbuild_name': 'Fix Framework Link',
397 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
398 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
399 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
403 # Modify the Info.plist as needed.
404 'postbuild_name': 'Tweak Info.plist',
405 'action': ['../build/mac/tweak_info_plist.py',
407 '--version=<(content_shell_version)'],
410 # This postbuid step is responsible for creating the following
413 # Content Shell Helper EH.app and Content Shell Helper NP.app are
414 # created from Content Shell Helper.app.
416 # The EH helper is marked for an executable heap. The NP helper
417 # is marked for no PIE (ASLR).
418 'postbuild_name': 'Make More Helpers',
420 '../build/mac/make_more_helpers.sh',
422 '<(content_shell_product_name)',
426 # Make sure there isn't any Objective-C in the shell's
428 'postbuild_name': 'Verify No Objective-C',
430 '../build/mac/verify_no_objc.sh',
438 'target_name': 'content_shell_builder',
449 'target_name': 'content_shell_framework',
450 'type': 'shared_library',
451 'product_name': '<(content_shell_product_name) Framework',
453 'mac_bundle_resources': [
454 'shell/mac/English.lproj/HttpAuth.xib',
455 'shell/mac/English.lproj/MainMenu.xib',
456 '<(PRODUCT_DIR)/content_shell.pak'
465 'shell/shell_content_main.cc',
466 'shell/shell_content_main.h',
470 # Copy FFmpeg binaries for audio/video support.
471 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
473 '<(PRODUCT_DIR)/ffmpegsumo.so',
477 }, # target content_shell_framework
479 'target_name': 'content_shell_helper_app',
480 'type': 'executable',
481 'variables': { 'enable_wexit_time_destructors': 1, },
482 'product_name': '<(content_shell_product_name) Helper',
485 'content_shell_framework',
488 'shell/shell_main.cc',
489 'shell/mac/helper-Info.plist',
491 # TODO(mark): Come up with a fancier way to do this. It should only
492 # be necessary to list helper-Info.plist once, not the three times it
494 'mac_bundle_resources!': [
495 'shell/mac/helper-Info.plist',
497 # TODO(mark): For now, don't put any resources into this app. Its
498 # resources directory will be a symbolic link to the browser app's
499 # resources directory.
500 'mac_bundle_resources/': [
504 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
508 # The framework defines its load-time path
509 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
510 # (chrome). A different relative path needs to be used in
511 # content_shell_helper_app.
512 'postbuild_name': 'Fix Framework Link',
516 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
517 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
518 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
522 # Modify the Info.plist as needed. The script explains why this
523 # is needed. This is also done in the chrome and chrome_dll
524 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
525 # are used because Breakpad, Keystone, and SCM keys are
526 # never placed into the helper.
527 'postbuild_name': 'Tweak Info.plist',
528 'action': ['../build/mac/tweak_info_plist.py',
532 '--version=<(content_shell_version)'],
535 # Make sure there isn't any Objective-C in the helper app's
537 'postbuild_name': 'Verify No Objective-C',
539 '../build/mac/verify_no_objc.sh',
544 ['component=="shared_library"', {
546 'LD_RUNPATH_SEARCH_PATHS': [
547 # Get back from Content Shell.app/Contents/Frameworks/
548 # Helper.app/Contents/MacOS
549 '@loader_path/../../../../../..',
554 }, # target content_shell_helper_app
560 # TODO(jrg): Update this action and other jni generators to only
561 # require specifying the java directory and generate the rest.
562 'target_name': 'content_shell_jni_headers',
565 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/BrowserTestSystemMessageHandler.java',
566 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
567 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
568 'shell/android/java/src/org/chromium/content_shell/Shell.java',
570 'direct_dependent_settings': {
572 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
576 'jni_gen_dir': 'content/shell',
578 'includes': [ '../build/jni_generator.gypi' ],
581 'target_name': 'libcontent_shell_content_view',
582 'type': 'shared_library',
584 'content_shell_jni_headers',
587 # Skia is necessary to ensure the dependencies needed by
588 # WebContents are included.
589 '../skia/skia.gyp:skia',
590 '<(DEPTH)/media/media.gyp:player_android',
593 'shell/android/shell_library_loader.cc',
594 'shell/android/shell_library_loader.h',
597 ['android_build_type==1', {
599 '-lgabi++', # For rtti
605 'target_name': 'content_shell_java',
611 'java_in_dir': '../content/shell/android/java',
612 'has_java_resources': 1,
613 'R_package': 'org.chromium.content_shell',
614 'R_package_relpath': 'org/chromium/content_shell',
616 'includes': [ '../build/java.gypi' ],
619 # content_shell_apk creates a .jar as a side effect. Any java targets
620 # that need that .jar in their classpath should depend on this target,
621 # content_shell_apk_java. Dependents of content_shell_apk receive its
622 # jar path in the variable 'apk_output_jar_path'. This target should
623 # only be used by targets which instrument content_shell_apk.
624 'target_name': 'content_shell_apk_java',
629 # This all_dependent_settings is used for java targets only. This will
630 # add the content_shell jar to the classpath of dependent java
632 'all_dependent_settings': {
634 'input_jars_paths': ['>(apk_output_jar_path)'],
637 # Add an action with the appropriate output. This allows the generated
638 # buildfiles to determine which target the output corresponds to.
641 'action_name': 'fake_generate_jar',
643 'outputs': ['>(apk_output_jar_path)'],
649 'target_name': 'content_shell_apk',
653 'content_shell_java',
654 'libcontent_shell_content_view',
655 '../base/base.gyp:base_java',
656 '../media/media.gyp:media_java',
657 '../net/net.gyp:net_java',
658 '../ui/ui.gyp:ui_java',
661 'apk_name': 'ContentShell',
662 'manifest_package_name': 'org.chromium.content_shell_apk',
663 'java_in_dir': 'shell/android/shell_apk',
664 'resource_dir': 'res',
665 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
666 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
667 'asset_location': '<(ant_build_out)/content_shell/assets',
669 'includes': [ '../build/java_apk.gypi' ],