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',
75 'shell/shell_android.cc',
76 'shell/shell_aura.cc',
80 'shell/shell_application_mac.h',
81 'shell/shell_application_mac.mm',
82 'shell/shell_browser_context.cc',
83 'shell/shell_browser_context.h',
84 'shell/shell_browser_main.cc',
85 'shell/shell_browser_main.h',
86 'shell/shell_browser_main_parts.cc',
87 'shell/shell_browser_main_parts.h',
88 'shell/shell_browser_main_parts_mac.mm',
89 'shell/shell_content_browser_client.cc',
90 'shell/shell_content_browser_client.h',
91 'shell/shell_content_client.cc',
92 'shell/shell_content_client.h',
93 'shell/shell_content_renderer_client.cc',
94 'shell/shell_content_renderer_client.h',
95 'shell/shell_devtools_delegate.cc',
96 'shell/shell_devtools_delegate.h',
97 'shell/shell_devtools_frontend.cc',
98 'shell/shell_devtools_frontend.h',
99 'shell/shell_download_manager_delegate.cc',
100 'shell/shell_download_manager_delegate.h',
101 'shell/shell_javascript_dialog_manager.cc',
102 'shell/shell_javascript_dialog_manager.h',
103 'shell/shell_javascript_dialog_gtk.cc',
104 'shell/shell_javascript_dialog_mac.mm',
105 'shell/shell_javascript_dialog_win.cc',
106 'shell/shell_javascript_dialog.h',
107 'shell/shell_login_dialog_gtk.cc',
108 'shell/shell_login_dialog_mac.mm',
109 'shell/shell_login_dialog.cc',
110 'shell/shell_login_dialog.h',
111 'shell/shell_main_delegate.cc',
112 'shell/shell_main_delegate.h',
113 'shell/shell_message_filter.cc',
114 'shell/shell_message_filter.h',
115 'shell/shell_messages.cc',
116 'shell/shell_messages.h',
117 'shell/shell_network_delegate.cc',
118 'shell/shell_network_delegate.h',
119 'shell/shell_render_process_observer.cc',
120 'shell/shell_render_process_observer.h',
121 'shell/shell_resource_dispatcher_host_delegate.cc',
122 'shell/shell_resource_dispatcher_host_delegate.h',
123 'shell/shell_switches.cc',
124 'shell/shell_switches.h',
125 'shell/shell_test_configuration.cc',
126 'shell/shell_test_configuration.h',
127 'shell/shell_url_request_context_getter.cc',
128 'shell/shell_url_request_context_getter.h',
129 'shell/shell_web_contents_view_delegate_android.cc',
130 'shell/shell_web_contents_view_delegate_creator.h',
131 'shell/shell_web_contents_view_delegate_gtk.cc',
132 'shell/shell_web_contents_view_delegate_mac.mm',
133 'shell/shell_web_contents_view_delegate_win.cc',
134 'shell/shell_web_contents_view_delegate.h',
135 'shell/webkit_test_controller.cc',
136 'shell/webkit_test_controller.h',
137 'shell/webkit_test_helpers.cc',
138 'shell/webkit_test_helpers.h',
139 'shell/webkit_test_platform_support.h',
140 'shell/webkit_test_platform_support_android.cc',
141 'shell/webkit_test_platform_support_linux.cc',
142 'shell/webkit_test_platform_support_mac.mm',
143 'shell/webkit_test_platform_support_win.cc',
144 'shell/webkit_test_runner.cc',
145 'shell/webkit_test_runner.h',
149 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
153 ['OS=="win" and win_use_allocator_shim==1', {
155 '../base/allocator/allocator.gyp:allocator',
159 'resource_include_dirs': [
160 '<(SHARED_INTERMEDIATE_DIR)/webkit',
163 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
169 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
174 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
175 'msvs_disabled_warnings': [ 4267, ],
179 '../build/linux/system.gyp:fontconfig',
184 'content_shell_jni_headers',
186 }, { # else: OS!="android"
188 # This dependency is for running DRT against the content shell, and
189 # this combination is not yet supported on Android.
190 '../webkit/support/webkit_support.gyp:webkit_support',
193 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
195 # This is needed by content/app/content_main_runner.cc
196 '../base/allocator/allocator.gyp:allocator',
201 '../ui/aura/aura.gyp:aura',
202 '../ui/base/strings/ui_strings.gyp:ui_strings',
203 '../ui/views/controls/webview/webview.gyp:webview',
204 '../ui/views/views.gyp:views',
205 '../ui/views/views.gyp:views_test_support',
206 '../ui/ui.gyp:ui_resources',
209 ['exclude', 'shell/shell_gtk.cc'],
210 ['exclude', 'shell/shell_win.cc'],
215 '../ash/ash.gyp:ash',
216 '../chromeos/chromeos.gyp:chromeos',
219 ['use_custom_freetype==1', {
221 '../third_party/freetype2/freetype2.gyp:freetype2',
227 'target_name': 'content_shell_resources',
230 'generate_content_shell_resources',
233 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
235 'includes': [ '../build/grit_target.gypi' ],
238 'destination': '<(PRODUCT_DIR)',
240 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
246 'target_name': 'generate_content_shell_resources',
249 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
253 'action_name': 'content_shell_resources',
255 'grit_grd_file': 'shell/shell_resources.grd',
257 'includes': [ '../build/grit_action.gypi' ],
262 # We build a minimal set of resources so WebKit in content_shell has
263 # access to necessary resources.
264 'target_name': 'content_shell_pak',
267 'browser/devtools/devtools_resources.gyp:devtools_resources',
268 'content_shell_resources',
269 '<(DEPTH)/ui/ui.gyp:ui_resources',
272 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
276 'action_name': 'repack_content_shell_pack',
279 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
280 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
281 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
282 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
283 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
284 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
285 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
286 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
287 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
288 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
289 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
296 'action': ['python', '<(repack_path)', '<@(_outputs)',
301 '<(PRODUCT_DIR)/content_shell.pak',
305 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
313 'target_name': 'content_shell',
314 'type': 'executable',
316 'defines!': ['CONTENT_IMPLEMENTATION'],
323 '../third_party/mesa/mesa.gyp:osmesa',
329 'app/startup_helper_win.cc',
330 'shell/shell_main.cc',
332 'mac_bundle_resources': [
333 'shell/mac/app.icns',
334 'shell/mac/app-Info.plist',
336 # TODO(mark): Come up with a fancier way to do this. It should only
337 # be necessary to list app-Info.plist once, not the three times it is
339 'mac_bundle_resources!': [
340 'shell/mac/app-Info.plist',
343 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
347 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
351 ['OS=="win" and win_use_allocator_shim==1', {
353 '../base/allocator/allocator.gyp:allocator',
364 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
370 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
372 '../sandbox/sandbox.gyp:sandbox',
374 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
375 ['toolkit_uses_gtk == 1', {
377 '<(DEPTH)/build/linux/system.gyp:gtk',
379 }], # toolkit_uses_gtk
381 'product_name': '<(content_shell_product_name)',
386 'content_shell_framework',
387 'content_shell_helper_app',
391 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
393 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
399 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
401 '../build/mac/copy_framework_unversioned.sh',
402 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
403 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
407 'postbuild_name': 'Fix Framework Link',
411 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
412 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
413 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
417 # Modify the Info.plist as needed.
418 'postbuild_name': 'Tweak Info.plist',
419 'action': ['../build/mac/tweak_info_plist.py',
421 '--version=<(content_shell_version)'],
424 # This postbuid step is responsible for creating the following
427 # Content Shell Helper EH.app and Content Shell Helper NP.app are
428 # created from Content Shell Helper.app.
430 # The EH helper is marked for an executable heap. The NP helper
431 # is marked for no PIE (ASLR).
432 'postbuild_name': 'Make More Helpers',
434 '../build/mac/make_more_helpers.sh',
436 '<(content_shell_product_name)',
440 # Make sure there isn't any Objective-C in the shell's
442 'postbuild_name': 'Verify No Objective-C',
444 '../build/mac/verify_no_objc.sh',
452 'target_name': 'content_shell_builder',
463 'target_name': 'content_shell_framework',
464 'type': 'shared_library',
465 'product_name': '<(content_shell_product_name) Framework',
467 'mac_bundle_resources': [
468 'shell/mac/English.lproj/HttpAuth.xib',
469 'shell/mac/English.lproj/MainMenu.xib',
470 '<(PRODUCT_DIR)/content_shell.pak'
479 'shell/shell_content_main.cc',
480 'shell/shell_content_main.h',
484 # Copy FFmpeg binaries for audio/video support.
485 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
487 '<(PRODUCT_DIR)/ffmpegsumo.so',
491 }, # target content_shell_framework
493 'target_name': 'content_shell_helper_app',
494 'type': 'executable',
495 'variables': { 'enable_wexit_time_destructors': 1, },
496 'product_name': '<(content_shell_product_name) Helper',
499 'content_shell_framework',
502 'shell/shell_main.cc',
503 'shell/mac/helper-Info.plist',
505 # TODO(mark): Come up with a fancier way to do this. It should only
506 # be necessary to list helper-Info.plist once, not the three times it
508 'mac_bundle_resources!': [
509 'shell/mac/helper-Info.plist',
511 # TODO(mark): For now, don't put any resources into this app. Its
512 # resources directory will be a symbolic link to the browser app's
513 # resources directory.
514 'mac_bundle_resources/': [
518 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
522 # The framework defines its load-time path
523 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
524 # (chrome). A different relative path needs to be used in
525 # content_shell_helper_app.
526 'postbuild_name': 'Fix Framework Link',
530 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
531 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
532 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
536 # Modify the Info.plist as needed. The script explains why this
537 # is needed. This is also done in the chrome and chrome_dll
538 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
539 # are used because Breakpad, Keystone, and SCM keys are
540 # never placed into the helper.
541 'postbuild_name': 'Tweak Info.plist',
542 'action': ['../build/mac/tweak_info_plist.py',
546 '--version=<(content_shell_version)'],
549 # Make sure there isn't any Objective-C in the helper app's
551 'postbuild_name': 'Verify No Objective-C',
553 '../build/mac/verify_no_objc.sh',
558 ['component=="shared_library"', {
560 'LD_RUNPATH_SEARCH_PATHS': [
561 # Get back from Content Shell.app/Contents/Frameworks/
562 # Helper.app/Contents/MacOS
563 '@loader_path/../../../../../..',
568 }, # target content_shell_helper_app
574 # TODO(jrg): Update this action and other jni generators to only
575 # require specifying the java directory and generate the rest.
576 'target_name': 'content_shell_jni_headers',
579 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/BrowserTestSystemMessageHandler.java',
580 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
581 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
582 'shell/android/java/src/org/chromium/content_shell/Shell.java',
584 'direct_dependent_settings': {
586 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
590 'jni_gen_package': 'content/shell',
592 'includes': [ '../build/jni_generator.gypi' ],
595 'target_name': 'libcontent_shell_content_view',
596 'type': 'shared_library',
598 'content_shell_jni_headers',
601 # Skia is necessary to ensure the dependencies needed by
602 # WebContents are included.
603 '../skia/skia.gyp:skia',
604 '<(DEPTH)/media/media.gyp:player_android',
607 'shell/android/shell_library_loader.cc',
608 'shell/android/shell_library_loader.h',
611 ['android_webview_build==1', {
613 '-lgabi++', # For rtti
619 'target_name': 'content_shell_java',
625 'java_in_dir': '../content/shell/android/java',
626 'has_java_resources': 1,
627 'R_package': 'org.chromium.content_shell',
628 'R_package_relpath': 'org/chromium/content_shell',
630 'includes': [ '../build/java.gypi' ],
633 # content_shell_apk creates a .jar as a side effect. Any java targets
634 # that need that .jar in their classpath should depend on this target,
635 # content_shell_apk_java. Dependents of content_shell_apk receive its
636 # jar path in the variable 'apk_output_jar_path'. This target should
637 # only be used by targets which instrument content_shell_apk.
638 'target_name': 'content_shell_apk_java',
643 # This all_dependent_settings is used for java targets only. This will
644 # add the content_shell jar to the classpath of dependent java
646 'all_dependent_settings': {
648 'input_jars_paths': ['>(apk_output_jar_path)'],
651 # Add an action with the appropriate output. This allows the generated
652 # buildfiles to determine which target the output corresponds to.
655 'action_name': 'fake_generate_jar',
657 'outputs': ['>(apk_output_jar_path)'],
663 'target_name': 'content_shell_apk',
667 'content_shell_java',
668 'libcontent_shell_content_view',
669 '../base/base.gyp:base_java',
670 '../media/media.gyp:media_java',
671 '../net/net.gyp:net_java',
672 '../ui/ui.gyp:ui_java',
675 'apk_name': 'ContentShell',
676 'manifest_package_name': 'org.chromium.content_shell_apk',
677 'java_in_dir': 'shell/android/shell_apk',
678 'resource_dir': 'res',
679 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
680 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
681 'asset_location': '<(ant_build_out)/content_shell/assets',
683 'includes': [ '../build/java_apk.gypi' ],