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',
11 'target_name': 'content_shell_lib',
12 'type': 'static_library',
13 'defines!': ['CONTENT_IMPLEMENTATION'],
23 'content_ppapi_plugin',
25 'content_shell_resources',
28 'content_resources.gyp:content_resources',
29 '../base/base.gyp:base',
30 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
31 '../build/temp_gyp/googleurl.gyp:googleurl',
33 '../media/media.gyp:media',
35 '../net/net.gyp:net_resources',
36 '../skia/skia.gyp:skia',
38 '../v8/tools/gyp/v8.gyp:v8',
39 '../webkit/support/webkit_support.gyp:webkit_support',
40 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
41 '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
47 'shell/geolocation/shell_access_token_store.cc',
48 'shell/geolocation/shell_access_token_store.h',
53 'shell/shell_android.cc',
54 'shell/shell_aura.cc',
58 'shell/shell_application_mac.h',
59 'shell/shell_application_mac.mm',
60 'shell/shell_browser_context.cc',
61 'shell/shell_browser_context.h',
62 'shell/shell_browser_main.cc',
63 'shell/shell_browser_main.h',
64 'shell/shell_browser_main_parts.cc',
65 'shell/shell_browser_main_parts.h',
66 'shell/shell_browser_main_parts_mac.mm',
67 'shell/shell_content_browser_client.cc',
68 'shell/shell_content_browser_client.h',
69 'shell/shell_content_client.cc',
70 'shell/shell_content_client.h',
71 'shell/shell_content_renderer_client.cc',
72 'shell/shell_content_renderer_client.h',
73 'shell/shell_devtools_delegate.cc',
74 'shell/shell_devtools_delegate.h',
75 'shell/shell_download_manager_delegate.cc',
76 'shell/shell_download_manager_delegate.h',
77 'shell/shell_javascript_dialog_creator.cc',
78 'shell/shell_javascript_dialog_creator.h',
79 'shell/shell_javascript_dialog_gtk.cc',
80 'shell/shell_javascript_dialog_mac.mm',
81 'shell/shell_javascript_dialog_win.cc',
82 'shell/shell_javascript_dialog.h',
83 'shell/shell_login_dialog_gtk.cc',
84 'shell/shell_login_dialog_mac.mm',
85 'shell/shell_login_dialog.cc',
86 'shell/shell_login_dialog.h',
87 'shell/shell_main_delegate.cc',
88 'shell/shell_main_delegate.h',
89 'shell/shell_messages.cc',
90 'shell/shell_messages.h',
91 'shell/shell_network_delegate.cc',
92 'shell/shell_network_delegate.h',
93 'shell/shell_render_process_observer.cc',
94 'shell/shell_render_process_observer.h',
95 'shell/shell_resource_context.cc',
96 'shell/shell_resource_context.h',
97 'shell/shell_resource_dispatcher_host_delegate.cc',
98 'shell/shell_resource_dispatcher_host_delegate.h',
99 'shell/shell_stacking_client_ash.cc',
100 'shell/shell_stacking_client_ash.h',
101 'shell/shell_switches.cc',
102 'shell/shell_switches.h',
103 'shell/shell_url_request_context_getter.cc',
104 'shell/shell_url_request_context_getter.h',
105 'shell/shell_web_contents_view_delegate_creator.h',
106 'shell/shell_web_contents_view_delegate_gtk.cc',
107 'shell/shell_web_contents_view_delegate_mac.mm',
108 'shell/shell_web_contents_view_delegate_win.cc',
109 'shell/shell_web_contents_view_delegate.h',
110 'shell/webkit_test_platform_support.h',
111 'shell/webkit_test_platform_support_android.cc',
112 'shell/webkit_test_platform_support_linux.cc',
113 'shell/webkit_test_platform_support_mac.mm',
114 'shell/webkit_test_platform_support_win.cc',
115 'shell/webkit_test_runner.cc',
116 'shell/webkit_test_runner.h',
117 'shell/webkit_test_runner_bindings.cc',
118 'shell/webkit_test_runner_bindings.h',
119 'shell/webkit_test_runner_host.cc',
120 'shell/webkit_test_runner_host.h',
124 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
128 ['OS=="win" and win_use_allocator_shim==1', {
130 '../base/allocator/allocator.gyp:allocator',
134 'resource_include_dirs': [
135 '<(SHARED_INTERMEDIATE_DIR)/webkit',
138 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
139 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
145 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
153 'content_shell_jni_headers',
156 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
158 }, { # else: OS!="android"
160 # This dependency is for running DRT against the content shell, and
161 # this combination is not yet supported on Android.
162 '../webkit/support/webkit_support.gyp:webkit_support',
165 ['os_posix==1 and use_aura==1 and linux_use_tcmalloc==1', {
167 # This is needed by content/app/content_main_runner.cc
168 '../base/allocator/allocator.gyp:allocator',
173 '../ui/aura/aura.gyp:aura',
174 '../ui/base/strings/ui_strings.gyp:ui_strings',
175 '../ui/views/controls/webview/webview.gyp:webview',
176 '../ui/views/views.gyp:views',
177 '../ui/views/views.gyp:views_test_support',
178 '../ui/ui.gyp:ui_resources',
181 ['exclude', 'shell/shell_gtk.cc'],
182 ['exclude', 'shell/shell_win.cc'],
187 '../chromeos/chromeos.gyp:chromeos',
193 'target_name': 'content_shell_resources',
196 'generate_content_shell_resources',
199 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
201 'includes': [ '../build/grit_target.gypi' ],
204 'destination': '<(PRODUCT_DIR)',
206 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
212 'target_name': 'generate_content_shell_resources',
215 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
219 'action_name': 'content_shell_resources',
221 'grit_grd_file': 'shell/shell_resources.grd',
223 'includes': [ '../build/grit_action.gypi' ],
228 # We build a minimal set of resources so WebKit in content_shell has
229 # access to necessary resources.
230 'target_name': 'content_shell_pak',
233 'browser/debugger/devtools_resources.gyp:devtools_resources',
234 'content_shell_resources',
235 '<(DEPTH)/ui/ui.gyp:ui_resources',
238 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
242 'action_name': 'repack_content_shell_pack',
245 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
246 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
247 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
248 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
249 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
250 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
251 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
252 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
253 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
254 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
261 'action': ['python', '<(repack_path)', '<@(_outputs)',
266 '<(PRODUCT_DIR)/content_shell.pak',
270 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
278 'target_name': 'content_shell',
279 'type': 'executable',
281 'defines!': ['CONTENT_IMPLEMENTATION'],
288 '../third_party/mesa/mesa.gyp:osmesa',
289 '<(webkit_src_dir)/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:TestRunner_resources',
295 'app/startup_helper_win.cc',
296 'shell/shell_main.cc',
298 'mac_bundle_resources': [
299 'shell/mac/app.icns',
300 'shell/mac/app-Info.plist',
302 # TODO(mark): Come up with a fancier way to do this. It should only
303 # be necessary to list app-Info.plist once, not the three times it is
305 'mac_bundle_resources!': [
306 'shell/mac/app-Info.plist',
309 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
313 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
317 ['OS=="win" and win_use_allocator_shim==1', {
319 '../base/allocator/allocator.gyp:allocator',
330 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
336 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
338 '../sandbox/sandbox.gyp:sandbox',
340 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
341 ['toolkit_uses_gtk == 1', {
343 '<(DEPTH)/build/linux/system.gyp:gtk',
345 }], # toolkit_uses_gtk
347 'product_name': '<(content_shell_product_name)',
352 'content_shell_framework',
353 'content_shell_helper_app',
357 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
359 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
365 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
367 '../build/mac/copy_framework_unversioned.sh',
368 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
369 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
373 'postbuild_name': 'Fix Framework Link',
377 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
378 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
379 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
383 # Modify the Info.plist as needed.
384 'postbuild_name': 'Tweak Info.plist',
385 'action': ['../build/mac/tweak_info_plist.py',
389 # This postbuid step is responsible for creating the following
392 # Content Shell Helper EH.app and Content Shell Helper NP.app are
393 # created from Content Shell Helper.app.
395 # The EH helper is marked for an executable heap. The NP helper
396 # is marked for no PIE (ASLR).
397 'postbuild_name': 'Make More Helpers',
399 '../build/mac/make_more_helpers.sh',
401 '<(content_shell_product_name)',
405 # Make sure there isn't any Objective-C in the shell's
407 'postbuild_name': 'Verify No Objective-C',
409 '../build/mac/verify_no_objc.sh',
417 'target_name': 'content_shell_builder',
428 'target_name': 'content_shell_framework',
429 'type': 'shared_library',
430 'product_name': '<(content_shell_product_name) Framework',
432 'mac_bundle_resources': [
433 'shell/mac/English.lproj/HttpAuth.xib',
434 'shell/mac/English.lproj/MainMenu.xib',
435 '<(PRODUCT_DIR)/content_shell.pak'
444 'shell/shell_content_main.cc',
445 'shell/shell_content_main.h',
449 # Copy FFmpeg binaries for audio/video support.
450 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
452 '<(PRODUCT_DIR)/ffmpegsumo.so',
456 }, # target content_shell_framework
458 'target_name': 'content_shell_helper_app',
459 'type': 'executable',
460 'variables': { 'enable_wexit_time_destructors': 1, },
461 'product_name': '<(content_shell_product_name) Helper',
464 'content_shell_framework',
467 'shell/shell_main.cc',
468 'shell/mac/helper-Info.plist',
470 # TODO(mark): Come up with a fancier way to do this. It should only
471 # be necessary to list helper-Info.plist once, not the three times it
473 'mac_bundle_resources!': [
474 'shell/mac/helper-Info.plist',
476 # TODO(mark): For now, don't put any resources into this app. Its
477 # resources directory will be a symbolic link to the browser app's
478 # resources directory.
479 'mac_bundle_resources/': [
483 'INFOPLIST_FILE': 'shell/mac/helper-Info.plist',
487 # The framework defines its load-time path
488 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
489 # (chrome). A different relative path needs to be used in
490 # content_shell_helper_app.
491 'postbuild_name': 'Fix Framework Link',
495 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
496 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
497 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
501 # Modify the Info.plist as needed. The script explains why this
502 # is needed. This is also done in the chrome and chrome_dll
503 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
504 # are used because Breakpad, Keystone, and SCM keys are
505 # never placed into the helper.
506 'postbuild_name': 'Tweak Info.plist',
507 'action': ['../build/mac/tweak_info_plist.py',
513 # Make sure there isn't any Objective-C in the helper app's
515 'postbuild_name': 'Verify No Objective-C',
517 '../build/mac/verify_no_objc.sh',
522 ['component=="shared_library"', {
524 'LD_RUNPATH_SEARCH_PATHS': [
525 # Get back from Content Shell.app/Contents/Frameworks/
526 # Helper.app/Contents/MacOS
527 '@loader_path/../../../../../..',
532 }, # target content_shell_helper_app
538 # TODO(jrg): Update this action and other jni generators to only
539 # require specifying the java directory and generate the rest.
540 'target_name': 'content_shell_jni_headers',
543 'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
544 'shell/android/java/src/org/chromium/content_shell/Shell.java',
547 'jni_gen_dir': 'content/shell',
549 'includes': [ '../build/jni_generator.gypi' ],
552 'target_name': 'libcontent_shell_content_view',
553 'type': 'shared_library',
555 'content_shell_jni_headers',
558 # Skia is necessary to ensure the dependencies needed by
559 # WebContents are included.
560 '../skia/skia.gyp:skia',
561 '<(DEPTH)/media/media.gyp:player_android',
564 '<(SHARED_INTERMEDIATE_DIR)/content/shell',
567 'shell/android/shell_library_loader.cc',
568 'shell/android/shell_library_loader.h',
569 'shell/android/shell_manager.cc',
570 'shell/android/shell_manager.h',
573 'shell/shell_main.cc',
574 'shell/shell_main.h',
577 ['android_build_type==1', {
579 '-lgabi++', # For rtti
585 # content_shell_apk creates a .jar as a side effect. Any java targets
586 # that need that .jar in their classpath should depend on this target,
587 # content_shell_java.
588 'target_name': 'content_shell_java',
591 'output_jar': '<(PRODUCT_DIR)/lib.java/chromium_apk_content_shell.jar'
593 'outputs': ['<(output_jar)'],
597 '../base/base.gyp:base_java',
598 '../media/media.gyp:media_java',
599 '../net/net.gyp:net_java',
600 '../ui/ui.gyp:ui_java',
602 # This all_dependent_settings is used for java targets only. This will
603 # add the content_shell jar to the classpath of dependent java
605 'all_dependent_settings': {
607 'input_jars_paths': ['<(output_jar)'],
610 # Add an action with the appropriate output. This allows the generated
611 # buildfiles to determine which target the output corresponds to.
614 'action_name': 'fake_generate_jar',
616 'outputs': ['<(output_jar)'],
622 'target_name': 'content_shell_apk',
626 '../base/base.gyp:base_java',
627 '../media/media.gyp:media_java',
628 '../net/net.gyp:net_java',
629 '../ui/ui.gyp:ui_java',
632 'package_name': 'content_shell',
633 'apk_name': 'ContentShell',
634 'manifest_package_name': 'org.chromium.content_shell',
635 'java_in_dir': 'shell/android/java',
636 # TODO(cjhopman): The resource directory of all apks should be in
638 'resource_dir': '../res',
639 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'],
640 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
642 'includes': [ '../build/java_apk.gypi' ],