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_creator.cc',
95 'shell/shell_javascript_dialog_creator.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_context.cc',
115 'shell/shell_resource_context.h',
116 'shell/shell_resource_dispatcher_host_delegate.cc',
117 'shell/shell_resource_dispatcher_host_delegate.h',
118 'shell/shell_switches.cc',
119 'shell/shell_switches.h',
120 'shell/shell_url_request_context_getter.cc',
121 'shell/shell_url_request_context_getter.h',
122 'shell/shell_web_contents_view_delegate_creator.h',
123 'shell/shell_web_contents_view_delegate_gtk.cc',
124 'shell/shell_web_contents_view_delegate_mac.mm',
125 'shell/shell_web_contents_view_delegate_win.cc',
126 'shell/shell_web_contents_view_delegate.h',
127 'shell/webkit_test_controller.cc',
128 'shell/webkit_test_controller.h',
129 'shell/webkit_test_helpers.cc',
130 'shell/webkit_test_helpers.h',
131 'shell/webkit_test_platform_support.h',
132 'shell/webkit_test_platform_support_android.cc',
133 'shell/webkit_test_platform_support_linux.cc',
134 'shell/webkit_test_platform_support_mac.mm',
135 'shell/webkit_test_platform_support_win.cc',
136 'shell/webkit_test_runner.cc',
137 'shell/webkit_test_runner.h',
138 'shell/webkit_test_runner_bindings.cc',
139 'shell/webkit_test_runner_bindings.h',
143 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
147 ['OS=="win" and win_use_allocator_shim==1', {
149 '../base/allocator/allocator.gyp:allocator',
153 'resource_include_dirs': [
154 '<(SHARED_INTERMEDIATE_DIR)/webkit',
157 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
163 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
171 '../build/linux/system.gyp:fontconfig',
176 'content_shell_jni_headers',
178 }, { # else: OS!="android"
180 # This dependency is for running DRT against the content shell, and
181 # this combination is not yet supported on Android.
182 '../webkit/support/webkit_support.gyp:webkit_support',
185 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
187 # This is needed by content/app/content_main_runner.cc
188 '../base/allocator/allocator.gyp:allocator',
193 '../ui/aura/aura.gyp:aura',
194 '../ui/base/strings/ui_strings.gyp:ui_strings',
195 '../ui/views/controls/webview/webview.gyp:webview',
196 '../ui/views/views.gyp:views',
197 '../ui/views/views.gyp:views_test_support',
198 '../ui/ui.gyp:ui_resources',
201 ['exclude', 'shell/shell_gtk.cc'],
202 ['exclude', 'shell/shell_win.cc'],
207 '../ash/ash.gyp:ash',
208 '../chromeos/chromeos.gyp:chromeos',
214 'target_name': 'content_shell_resources',
217 'generate_content_shell_resources',
220 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
222 'includes': [ '../build/grit_target.gypi' ],
225 'destination': '<(PRODUCT_DIR)',
227 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
233 'target_name': 'generate_content_shell_resources',
236 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
240 'action_name': 'content_shell_resources',
242 'grit_grd_file': 'shell/shell_resources.grd',
244 'includes': [ '../build/grit_action.gypi' ],
249 # We build a minimal set of resources so WebKit in content_shell has
250 # access to necessary resources.
251 'target_name': 'content_shell_pak',
254 'browser/devtools/devtools_resources.gyp:devtools_resources',
255 'content_shell_resources',
256 '<(DEPTH)/ui/ui.gyp:ui_resources',
259 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
263 'action_name': 'repack_content_shell_pack',
266 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
267 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
268 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
269 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
270 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
271 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
272 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
273 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
274 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
275 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
276 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
283 'action': ['python', '<(repack_path)', '<@(_outputs)',
288 '<(PRODUCT_DIR)/content_shell.pak',
292 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
300 'target_name': 'content_shell',
301 'type': 'executable',
303 'defines!': ['CONTENT_IMPLEMENTATION'],
310 '../third_party/mesa/mesa.gyp:osmesa',
316 'app/startup_helper_win.cc',
317 'shell/shell_main.cc',
319 'mac_bundle_resources': [
320 'shell/mac/app.icns',
321 'shell/mac/app-Info.plist',
323 # TODO(mark): Come up with a fancier way to do this. It should only
324 # be necessary to list app-Info.plist once, not the three times it is
326 'mac_bundle_resources!': [
327 'shell/mac/app-Info.plist',
330 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
334 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
338 ['OS=="win" and win_use_allocator_shim==1', {
340 '../base/allocator/allocator.gyp:allocator',
351 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
357 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
359 '../sandbox/sandbox.gyp:sandbox',
361 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
362 ['toolkit_uses_gtk == 1', {
364 '<(DEPTH)/build/linux/system.gyp:gtk',
366 }], # toolkit_uses_gtk
368 'product_name': '<(content_shell_product_name)',
373 'content_shell_framework',
374 'content_shell_helper_app',
378 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
380 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
386 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
388 '../build/mac/copy_framework_unversioned.sh',
389 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
390 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
394 'postbuild_name': 'Fix Framework Link',
398 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
399 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
400 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
404 # Modify the Info.plist as needed.
405 'postbuild_name': 'Tweak Info.plist',
406 'action': ['../build/mac/tweak_info_plist.py',
408 '--version=<(content_shell_version)'],
411 # This postbuid step is responsible for creating the following
414 # Content Shell Helper EH.app and Content Shell Helper NP.app are
415 # created from Content Shell Helper.app.
417 # The EH helper is marked for an executable heap. The NP helper
418 # is marked for no PIE (ASLR).
419 'postbuild_name': 'Make More Helpers',
421 '../build/mac/make_more_helpers.sh',
423 '<(content_shell_product_name)',
427 # Make sure there isn't any Objective-C in the shell's
429 'postbuild_name': 'Verify No Objective-C',
431 '../build/mac/verify_no_objc.sh',
439 'target_name': 'content_shell_builder',
450 'target_name': 'content_shell_framework',
451 'type': 'shared_library',
452 'product_name': '<(content_shell_product_name) Framework',
454 'mac_bundle_resources': [
455 'shell/mac/English.lproj/HttpAuth.xib',
456 'shell/mac/English.lproj/MainMenu.xib',
457 '<(PRODUCT_DIR)/content_shell.pak'
466 'shell/shell_content_main.cc',
467 'shell/shell_content_main.h',
471 # Copy FFmpeg binaries for audio/video support.
472 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
474 '<(PRODUCT_DIR)/ffmpegsumo.so',
478 }, # target content_shell_framework
480 'target_name': 'content_shell_helper_app',
481 'type': 'executable',
482 'variables': { 'enable_wexit_time_destructors': 1, },
483 'product_name': '<(content_shell_product_name) Helper',
486 'content_shell_framework',
489 'shell/shell_main.cc',
490 'shell/mac/helper-Info.plist',
492 # TODO(mark): Come up with a fancier way to do this. It should only
493 # be necessary to list helper-Info.plist once, not the three times it
495 'mac_bundle_resources!': [
496 'shell/mac/helper-Info.plist',
498 # TODO(mark): For now, don't put any resources into this app. Its
499 # resources directory will be a symbolic link to the browser app's
500 # resources directory.
501 'mac_bundle_resources/': [
505 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
509 # The framework defines its load-time path
510 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
511 # (chrome). A different relative path needs to be used in
512 # content_shell_helper_app.
513 'postbuild_name': 'Fix Framework Link',
517 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
518 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
519 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
523 # Modify the Info.plist as needed. The script explains why this
524 # is needed. This is also done in the chrome and chrome_dll
525 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
526 # are used because Breakpad, Keystone, and SCM keys are
527 # never placed into the helper.
528 'postbuild_name': 'Tweak Info.plist',
529 'action': ['../build/mac/tweak_info_plist.py',
533 '--version=<(content_shell_version)'],
536 # Make sure there isn't any Objective-C in the helper app's
538 'postbuild_name': 'Verify No Objective-C',
540 '../build/mac/verify_no_objc.sh',
545 ['component=="shared_library"', {
547 'LD_RUNPATH_SEARCH_PATHS': [
548 # Get back from Content Shell.app/Contents/Frameworks/
549 # Helper.app/Contents/MacOS
550 '@loader_path/../../../../../..',
555 }, # target content_shell_helper_app
561 # TODO(jrg): Update this action and other jni generators to only
562 # require specifying the java directory and generate the rest.
563 'target_name': 'content_shell_jni_headers',
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 'package_name': 'content_shell',
612 'java_in_dir': '../content/shell/android/java',
613 'has_java_resources': 1,
614 'R_package': 'org.chromium.content_shell',
615 'R_package_relpath': 'org/chromium/content_shell',
617 'includes': [ '../build/java.gypi' ],
620 # content_shell_apk creates a .jar as a side effect. Any java targets
621 # that need that .jar in their classpath should depend on this target,
622 # content_shell_apk_java. Dependents of content_shell_apk receive its
623 # jar path in the variable 'apk_output_jar_path'. This target should
624 # only be used by targets which instrument content_shell_apk.
625 'target_name': 'content_shell_apk_java',
630 # This all_dependent_settings is used for java targets only. This will
631 # add the content_shell jar to the classpath of dependent java
633 'all_dependent_settings': {
635 'input_jars_paths': ['>(apk_output_jar_path)'],
638 # Add an action with the appropriate output. This allows the generated
639 # buildfiles to determine which target the output corresponds to.
642 'action_name': 'fake_generate_jar',
644 'outputs': ['>(apk_output_jar_path)'],
650 'target_name': 'content_shell_apk',
654 'content_shell_java',
655 'libcontent_shell_content_view',
656 '../base/base.gyp:base_java',
657 '../media/media.gyp:media_java',
658 '../net/net.gyp:net_java',
659 '../ui/ui.gyp:ui_java',
662 'package_name': 'content_shell_apk',
663 'apk_name': 'ContentShell',
664 'manifest_package_name': 'org.chromium.content_shell_apk',
665 'java_in_dir': 'shell/android/shell_apk',
666 'resource_dir': 'res',
667 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
668 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
669 'asset_location': '<(ant_build_out)/content_shell/assets',
671 'includes': [ '../build/java_apk.gypi' ],