Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / content_shell.gypi
blob6541d4f9f17729ecf2e256409de9ba4e45f6c674
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.
6   'variables': {
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
10     # standard Chrome.
11     'content_shell_version': '19.77.34.5',
12     'conditions': [
13       ['OS=="linux"', {
14        'use_custom_freetype%': 1,
15       }, {
16        'use_custom_freetype%': 0,
17       }],
18     ],
19   },
20   'targets': [
21     {
22       'target_name': 'content_shell_lib',
23       'type': 'static_library',
24       'defines!': ['CONTENT_IMPLEMENTATION'],
25       'defines': ['CONTENT_SHELL_VERSION="<(content_shell_version)"'],
26       'variables': {
27         'chromium_code': 1,
28       },
29       'dependencies': [
30         'content_app_both',
31         'content_browser',
32         'content_common',
33         'content_gpu',
34         'content_plugin',
35         'content_ppapi_plugin',
36         'content_renderer',
37         'content_shell_resources',
38         'content_utility',
39         'content_worker',
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         '../ipc/ipc.gyp:ipc',
45         '../media/media.gyp:media',
46         '../net/net.gyp:net',
47         '../net/net.gyp:net_resources',
48         '../skia/skia.gyp:skia',
49         '../third_party/WebKit/public/blink_test_runner.gyp:blink_test_runner',
50         '../ui/gl/gl.gyp:gl',
51         '../ui/ui.gyp:ui',
52         '../url/url.gyp:url_lib',
53         '../v8/tools/gyp/v8.gyp:v8',
54         '../webkit/common/webkit_common.gyp:webkit_common',
55         '../webkit/webkit_resources.gyp:webkit_resources',
56         '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent',
57         '../webkit/support/webkit_support.gyp:glue',
58       ],
59       'include_dirs': [
60         '..',
61       ],
62       'sources': [
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/app/paths_mac.h',
68         'shell/app/paths_mac.mm',
69         'shell/app/shell_main_delegate.cc',
70         'shell/app/shell_main_delegate.h',
71         'shell/app/shell_main_delegate_mac.h',
72         'shell/app/shell_main_delegate_mac.mm',
73         'shell/app/webkit_test_platform_support_android.cc',
74         'shell/app/webkit_test_platform_support.h',
75         'shell/app/webkit_test_platform_support_linux.cc',
76         'shell/app/webkit_test_platform_support_mac.mm',
77         'shell/app/webkit_test_platform_support_win.cc',
78         'shell/browser/minimal_shell.cc',
79         'shell/browser/minimal_shell.h',
80         'shell/browser/notify_done_forwarder.cc',
81         'shell/browser/notify_done_forwarder.h',
82         'shell/browser/shell_android.cc',
83         'shell/browser/shell_application_mac.h',
84         'shell/browser/shell_application_mac.mm',
85         'shell/browser/shell_aura.cc',
86         'shell/browser/shell_browser_context.cc',
87         'shell/browser/shell_browser_context.h',
88         'shell/browser/shell_browser_main.cc',
89         'shell/browser/shell_browser_main.h',
90         'shell/browser/shell_browser_main_parts.cc',
91         'shell/browser/shell_browser_main_parts.h',
92         'shell/browser/shell_browser_main_parts_mac.mm',
93         'shell/browser/shell.cc',
94         'shell/browser/shell_content_browser_client.cc',
95         'shell/browser/shell_content_browser_client.h',
96         'shell/browser/shell_devtools_delegate.cc',
97         'shell/browser/shell_devtools_delegate.h',
98         'shell/browser/shell_devtools_frontend.cc',
99         'shell/browser/shell_devtools_frontend.h',
100         'shell/browser/shell_download_manager_delegate.cc',
101         'shell/browser/shell_download_manager_delegate.h',
102         'shell/browser/shell_gtk.cc',
103         'shell/browser/shell.h',
104         'shell/browser/shell_javascript_dialog_gtk.cc',
105         'shell/browser/shell_javascript_dialog.h',
106         'shell/browser/shell_javascript_dialog_mac.mm',
107         'shell/browser/shell_javascript_dialog_manager.cc',
108         'shell/browser/shell_javascript_dialog_manager.h',
109         'shell/browser/shell_javascript_dialog_win.cc',
110         'shell/browser/shell_layout_tests_android.cc',
111         'shell/browser/shell_layout_tests_android.h',
112         'shell/browser/shell_login_dialog.cc',
113         'shell/browser/shell_login_dialog_gtk.cc',
114         'shell/browser/shell_login_dialog.h',
115         'shell/browser/shell_login_dialog_mac.mm',
116         'shell/browser/shell_mac.mm',
117         'shell/browser/shell_message_filter.cc',
118         'shell/browser/shell_message_filter.h',
119         'shell/browser/shell_net_log.cc',
120         'shell/browser/shell_net_log.h',
121         'shell/browser/shell_network_delegate.cc',
122         'shell/browser/shell_network_delegate.h',
123         'shell/browser/shell_plugin_service_filter.cc',
124         'shell/browser/shell_plugin_service_filter.h',
125         'shell/browser/shell_quota_permission_context.cc',
126         'shell/browser/shell_quota_permission_context.h',
127         'shell/browser/shell_resource_dispatcher_host_delegate.cc',
128         'shell/browser/shell_resource_dispatcher_host_delegate.h',
129         'shell/browser/shell_speech_recognition_manager_delegate.cc',
130         'shell/browser/shell_speech_recognition_manager_delegate.h',
131         'shell/browser/shell_url_request_context_getter.cc',
132         'shell/browser/shell_url_request_context_getter.h',
133         'shell/browser/shell_web_contents_view_delegate_android.cc',
134         'shell/browser/shell_web_contents_view_delegate_creator.h',
135         'shell/browser/shell_web_contents_view_delegate_gtk.cc',
136         'shell/browser/shell_web_contents_view_delegate.h',
137         'shell/browser/shell_web_contents_view_delegate_mac.mm',
138         'shell/browser/shell_web_contents_view_delegate_win.cc',
139         'shell/browser/shell_win.cc',
140         'shell/browser/webkit_test_controller.cc',
141         'shell/browser/webkit_test_controller.h',
142         'shell/common/shell_content_client.cc',
143         'shell/common/shell_content_client.h',
144         'shell/common/shell_messages.cc',
145         'shell/common/shell_messages.h',
146         'shell/common/shell_switches.cc',
147         'shell/common/shell_switches.h',
148         'shell/common/shell_test_configuration.cc',
149         'shell/common/shell_test_configuration.h',
150         'shell/common/webkit_test_helpers.cc',
151         'shell/common/webkit_test_helpers.h',
152         'shell/geolocation/shell_access_token_store.cc',
153         'shell/geolocation/shell_access_token_store.h',
154         'shell/renderer/gc_extension.cc',
155         'shell/renderer/gc_extension.h',
156         'shell/renderer/shell_content_renderer_client.cc',
157         'shell/renderer/shell_content_renderer_client.h',
158         'shell/renderer/shell_render_process_observer.cc',
159         'shell/renderer/shell_render_process_observer.h',
160         'shell/renderer/shell_render_view_observer.cc',
161         'shell/renderer/shell_render_view_observer.h',
162         'shell/renderer/webkit_test_runner.cc',
163         'shell/renderer/webkit_test_runner.h',
164       ],
165       'msvs_settings': {
166         'VCLinkerTool': {
167           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
168         },
169       },
170       'conditions': [
171         ['OS=="win" and win_use_allocator_shim==1', {
172           'dependencies': [
173             '../base/allocator/allocator.gyp:allocator',
174           ],
175         }],
176         ['OS=="win"', {
177           'resource_include_dirs': [
178             '<(SHARED_INTERMEDIATE_DIR)/webkit',
179           ],
180           'dependencies': [
181             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
182           ],
183           'configurations': {
184             'Debug_Base': {
185               'msvs_settings': {
186                 'VCLinkerTool': {
187                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
188                 },
189               },
190             },
191           },
192           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
193           'msvs_disabled_warnings': [ 4267, ],
194         }],  # OS=="win"
195         ['OS=="linux"', {
196           'dependencies': [
197             '../build/linux/system.gyp:fontconfig',
198           ],
199         }],
200         ['OS=="android"', {
201           'dependencies': [
202             'content_shell_jni_headers',
203           ],
204         }, {  # else: OS!="android"
205           'dependencies': [
206             # This dependency is for running DRT against the content shell, and
207             # this combination is not yet supported on Android.
208             'test_support_content',
209           ],
210         }],  # OS=="android"
211         ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (android_use_tcmalloc==1)', {
212           'dependencies': [
213             # This is needed by content/app/content_main_runner.cc
214             '../base/allocator/allocator.gyp:allocator',
215           ],
216         }],
217         ['use_aura==1', {
218           'dependencies': [
219             '../ui/aura/aura.gyp:aura',
220             '../ui/base/strings/ui_strings.gyp:ui_strings',
221             '../ui/views/controls/webview/webview.gyp:webview',
222             '../ui/views/views.gyp:views',
223             '../ui/views/views.gyp:views_test_support',
224             '../ui/ui.gyp:ui_resources',
225           ],
226           'sources/': [
227             ['exclude', 'shell/browser/shell_gtk.cc'],
228             ['exclude', 'shell/browser/shell_win.cc'],
229           ],
230         }],  # use_aura==1
231         ['chromeos==1', {
232           'dependencies': [
233             '../chromeos/chromeos.gyp:chromeos',
234            ],
235         }], # chromeos==1
236         ['use_ash==1', {
237           'dependencies': [
238             '../ash/ash.gyp:ash',
239            ],
240         }],
241         ['use_custom_freetype==1', {
242           'dependencies': [
243              '../third_party/freetype2/freetype2.gyp:freetype2',
244           ],
245         }],
246         ['enable_plugins==0', {
247           'sources/': [
248             ['exclude', 'shell/browser/shell_plugin_service_filter.cc'],
249             ['exclude', 'shell/browser/shell_plugin_service_filter.h'],
250           ],
251         }]
252       ],
253     },
254     {
255       'target_name': 'content_shell_resources',
256       'type': 'none',
257       'dependencies': [
258         'generate_content_shell_resources',
259       ],
260       'variables': {
261         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
262       },
263       'includes': [ '../build/grit_target.gypi' ],
264       'copies': [
265         {
266           'destination': '<(PRODUCT_DIR)',
267           'files': [
268             '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
269           ],
270         },
271       ],
272     },
273     {
274       'target_name': 'generate_content_shell_resources',
275       'type': 'none',
276       'variables': {
277         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
278       },
279       'actions': [
280         {
281           'action_name': 'content_shell_resources',
282           'variables': {
283             'grit_grd_file': 'shell/shell_resources.grd',
284           },
285           'includes': [ '../build/grit_action.gypi' ],
286         },
287       ],
288     },
289     {
290       # We build a minimal set of resources so WebKit in content_shell has
291       # access to necessary resources.
292       'target_name': 'content_shell_pak',
293       'type': 'none',
294       'dependencies': [
295         'browser/devtools/devtools_resources.gyp:devtools_resources',
296         'content_resources.gyp:content_resources',
297         'content_shell_resources',
298         '<(DEPTH)/net/net.gyp:net_resources',
299         '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
300         '<(DEPTH)/ui/ui.gyp:ui_resources',
301         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
302         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
303       ],
304       'conditions': [
305         ['OS!="android" and OS!="ios"', {
306           'dependencies': [
307             'browser/tracing/tracing_resources.gyp:tracing_resources',
308           ],
309         }],
310       ],
311       'variables': {
312         'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
313       },
314       'actions': [
315         {
316           'action_name': 'repack_content_shell_pack',
317           'variables': {
318             'pak_inputs': [
319               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
320               '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
321               '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
322               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
323               '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
324               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
325               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
326               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
327               '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
328               '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
329               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
330               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
331             ],
332           },
333           'inputs': [
334             '<(repack_path)',
335             '<@(pak_inputs)',
336           ],
337           'action': ['python', '<(repack_path)', '<@(_outputs)',
338                      '<@(pak_inputs)'],
339           'conditions': [
340             ['OS!="android"', {
341               'outputs': [
342                 '<(PRODUCT_DIR)/content_shell.pak',
343               ],
344             }, {
345               'outputs': [
346                 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
347               ],
348             }],
349           ],
350         },
351       ],
352     },
353     {
354       'target_name': 'content_shell',
355       'type': 'executable',
356       'mac_bundle': 1,
357       'defines!': ['CONTENT_IMPLEMENTATION'],
358       'variables': {
359         'chromium_code': 1,
360       },
361       'dependencies': [
362         'content_shell_lib',
363         'content_shell_pak',
364         '../third_party/mesa/mesa.gyp:osmesa',
365         '../tools/imagediff/image_diff.gyp:image_diff',
366       ],
367       'include_dirs': [
368         '..',
369       ],
370       'sources': [
371         'app/startup_helper_win.cc',
372         'shell/app/shell_main.cc',
373       ],
374       'mac_bundle_resources': [
375         'shell/app/app.icns',
376         'shell/app/app-Info.plist',
377       ],
378       # TODO(mark): Come up with a fancier way to do this.  It should only
379       # be necessary to list app-Info.plist once, not the three times it is
380       # listed here.
381       'mac_bundle_resources!': [
382         'shell/app/app-Info.plist',
383       ],
384       'xcode_settings': {
385         'INFOPLIST_FILE': 'shell/app/app-Info.plist',
386       },
387       'msvs_settings': {
388         'VCLinkerTool': {
389           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
390         },
391         'VCManifestTool': {
392           'AdditionalManifestFiles': [
393             'shell/app/shell.exe.manifest',
394           ],
395         },
396       },
397       'conditions': [
398         ['OS=="win" and win_use_allocator_shim==1', {
399           'dependencies': [
400             '../base/allocator/allocator.gyp:allocator',
401           ],
402         }],
403         ['OS=="win"', {
404           'sources': [
405             'shell/app/shell.rc',
406           ],
407           'configurations': {
408             'Debug_Base': {
409               'msvs_settings': {
410                 'VCLinkerTool': {
411                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
412                 },
413               },
414             },
415           },
416         }],  # OS=="win"
417         ['OS == "win" or toolkit_uses_gtk == 1', {
418           'dependencies': [
419             '../sandbox/sandbox.gyp:sandbox',
420           ],
421         }],  # OS=="win" or toolkit_uses_gtk == 1
422         ['toolkit_uses_gtk == 1', {
423           'dependencies': [
424             '<(DEPTH)/build/linux/system.gyp:gtk',
425           ],
426         }],  # toolkit_uses_gtk
427         ['OS=="mac"', {
428           'product_name': '<(content_shell_product_name)',
429           'dependencies!': [
430             'content_shell_lib',
431           ],
432           'dependencies': [
433             'content_shell_framework',
434             'content_shell_helper_app',
435           ],
436           'copies': [
437             {
438               'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
439               'files': [
440                 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
441               ],
442             },
443           ],
444           'postbuilds': [
445             {
446               'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
447               'action': [
448                 '../build/mac/copy_framework_unversioned.sh',
449                 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
450                 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
451               ],
452             },
453             {
454               'postbuild_name': 'Fix Framework Link',
455               'action': [
456                 'install_name_tool',
457                 '-change',
458                 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
459                 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
460                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
461               ],
462             },
463             {
464               # Modify the Info.plist as needed.
465               'postbuild_name': 'Tweak Info.plist',
466               'action': ['../build/mac/tweak_info_plist.py',
467                          '--scm=1',
468                          '--version=<(content_shell_version)'],
469             },
470             {
471               # This postbuid step is responsible for creating the following
472               # helpers:
473               #
474               # Content Shell Helper EH.app and Content Shell Helper NP.app are
475               # created from Content Shell Helper.app.
476               #
477               # The EH helper is marked for an executable heap. The NP helper
478               # is marked for no PIE (ASLR).
479               'postbuild_name': 'Make More Helpers',
480               'action': [
481                 '../build/mac/make_more_helpers.sh',
482                 'Frameworks',
483                 '<(content_shell_product_name)',
484               ],
485             },
486             {
487               # Make sure there isn't any Objective-C in the shell's
488               # executable.
489               'postbuild_name': 'Verify No Objective-C',
490               'action': [
491                 '../build/mac/verify_no_objc.sh',
492               ],
493             },
494           ],
495         }],  # OS=="mac"
496         ['OS=="android"', {
497           'dependencies!': [
498             '../tools/imagediff/image_diff.gyp:image_diff',
499           ],
500         }],  # OS=="android"
501         ['OS=="android" and android_webview_build==0', {
502           'dependencies': [
503             '../tools/imagediff/image_diff.gyp:image_diff#host',
504           ],
505         }],  # OS=="android" and android_webview_build==0
506       ],
507     },
508     {
509       'target_name': 'content_shell_builder',
510       'type': 'none',
511       'dependencies': [
512         'content_shell',
513       ],
514     },
515   ],
516   'conditions': [
517     ['OS=="mac"', {
518       'targets': [
519         {
520           'target_name': 'content_shell_framework',
521           'type': 'shared_library',
522           'product_name': '<(content_shell_product_name) Framework',
523           'mac_bundle': 1,
524           'mac_bundle_resources': [
525             'shell/app/English.lproj/HttpAuth.xib',
526             'shell/app/English.lproj/MainMenu.xib',
527             '<(PRODUCT_DIR)/content_shell.pak'
528           ],
529           'dependencies': [
530             'content_shell_lib',
531           ],
532           'include_dirs': [
533             '..',
534           ],
535           'sources': [
536             'shell/app/shell_content_main.cc',
537             'shell/app/shell_content_main.h',
538           ],
539           'copies': [
540             {
541               # Copy FFmpeg binaries for audio/video support.
542               'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
543               'files': [
544                 '<(PRODUCT_DIR)/ffmpegsumo.so',
545               ],
546             },
547           ],
548           'conditions': [
549             ['enable_webrtc==1', {
550               'variables': {
551                 'libpeer_target_type%': 'static_library',
552               },
553               'conditions': [
554                 ['libpeer_target_type!="static_library"', {
555                   'copies': [{
556                    'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
557                    'files': [
558                       '<(PRODUCT_DIR)/libpeerconnection.so',
559                     ],
560                   }],
561                 }],
562               ],
563             }],
564           ],
565         },  # target content_shell_framework
566         {
567           'target_name': 'content_shell_helper_app',
568           'type': 'executable',
569           'variables': { 'enable_wexit_time_destructors': 1, },
570           'product_name': '<(content_shell_product_name) Helper',
571           'mac_bundle': 1,
572           'dependencies': [
573             'content_shell_framework',
574           ],
575           'sources': [
576             'shell/app/shell_main.cc',
577             'shell/app/helper-Info.plist',
578           ],
579           # TODO(mark): Come up with a fancier way to do this.  It should only
580           # be necessary to list helper-Info.plist once, not the three times it
581           # is listed here.
582           'mac_bundle_resources!': [
583             'shell/app/helper-Info.plist',
584           ],
585           # TODO(mark): For now, don't put any resources into this app.  Its
586           # resources directory will be a symbolic link to the browser app's
587           # resources directory.
588           'mac_bundle_resources/': [
589             ['exclude', '.*'],
590           ],
591           'xcode_settings': {
592             'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
593           },
594           'postbuilds': [
595             {
596               # The framework defines its load-time path
597               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
598               # (chrome).  A different relative path needs to be used in
599               # content_shell_helper_app.
600               'postbuild_name': 'Fix Framework Link',
601               'action': [
602                 'install_name_tool',
603                 '-change',
604                 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
605                 '@executable_path/../../../../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
606                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
607               ],
608             },
609             {
610               # Modify the Info.plist as needed.  The script explains why this
611               # is needed.  This is also done in the chrome and chrome_dll
612               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
613               # are used because Breakpad, Keystone, and SCM keys are
614               # never placed into the helper.
615               'postbuild_name': 'Tweak Info.plist',
616               'action': ['../build/mac/tweak_info_plist.py',
617                          '--breakpad=0',
618                          '--keystone=0',
619                          '--scm=0',
620                          '--version=<(content_shell_version)'],
621             },
622             {
623               # Make sure there isn't any Objective-C in the helper app's
624               # executable.
625               'postbuild_name': 'Verify No Objective-C',
626               'action': [
627                 '../build/mac/verify_no_objc.sh',
628               ],
629             },
630           ],
631           'conditions': [
632             ['component=="shared_library"', {
633               'xcode_settings': {
634                 'LD_RUNPATH_SEARCH_PATHS': [
635                   # Get back from Content Shell.app/Contents/Frameworks/
636                   #                                 Helper.app/Contents/MacOS
637                   '@loader_path/../../../../../..',
638                 ],
639               },
640             }],
641           ],
642         },  # target content_shell_helper_app
643       ],
644     }],  # OS=="mac"
645     ['OS=="android"', {
646       'targets': [
647         {
648           # TODO(jrg): Update this action and other jni generators to only
649           # require specifying the java directory and generate the rest.
650           'target_name': 'content_shell_jni_headers',
651           'type': 'none',
652           'sources': [
653             'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
654             'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
655             'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
656             'shell/android/java/src/org/chromium/content_shell/Shell.java',
657           ],
658           'direct_dependent_settings': {
659             'include_dirs': [
660               '<(SHARED_INTERMEDIATE_DIR)/content/shell',
661             ],
662           },
663           'variables': {
664             'jni_gen_package': 'content/shell',
665           },
666           'includes': [ '../build/jni_generator.gypi' ],
667         },
668         {
669           'target_name': 'libcontent_shell_content_view',
670           'type': 'shared_library',
671           'dependencies': [
672             'content_shell_jni_headers',
673             'content_shell_lib',
674             'content_shell_pak',
675             # Skia is necessary to ensure the dependencies needed by
676             # WebContents are included.
677             '../skia/skia.gyp:skia',
678             '<(DEPTH)/media/media.gyp:player_android',
679           ],
680           'sources': [
681             'shell/android/shell_library_loader.cc',
682             'shell/android/shell_library_loader.h',
683           ],
684           'conditions': [
685             ['android_webview_build==1', {
686               'ldflags': [
687                 '-lgabi++',  # For rtti
688               ],
689             }],
690           ],
691         },
692         {
693           'target_name': 'content_shell_java',
694           'type': 'none',
695           'dependencies': [
696             'content_java',
697           ],
698           'variables': {
699             'java_in_dir': '../content/shell/android/java',
700             'has_java_resources': 1,
701             'R_package': 'org.chromium.content_shell',
702             'R_package_relpath': 'org/chromium/content_shell',
703           },
704           'includes': [ '../build/java.gypi' ],
705         },
706         {
707           # content_shell_apk creates a .jar as a side effect. Any java targets
708           # that need that .jar in their classpath should depend on this target,
709           # content_shell_apk_java. Dependents of content_shell_apk receive its
710           # jar path in the variable 'apk_output_jar_path'. This target should
711           # only be used by targets which instrument content_shell_apk.
712           'target_name': 'content_shell_apk_java',
713           'type': 'none',
714           'dependencies': [
715             'content_shell_apk',
716           ],
717           'includes': [ '../build/apk_fake_jar.gypi' ],
718         },
719         {
720           'target_name': 'content_shell_apk',
721           'type': 'none',
722           'dependencies': [
723             'content_java',
724             'content_java_test_support',
725             'content_shell_java',
726             'libcontent_shell_content_view',
727             '../base/base.gyp:base_java',
728             '../media/media.gyp:media_java',
729             '../net/net.gyp:net_java',
730             '../tools/android/forwarder/forwarder.gyp:forwarder',
731             '../ui/ui.gyp:ui_java',
732           ],
733           'variables': {
734             'apk_name': 'ContentShell',
735             'manifest_package_name': 'org.chromium.content_shell_apk',
736             'java_in_dir': 'shell/android/shell_apk',
737             'resource_dir': 'shell/android/shell_apk/res',
738             'native_lib_target': 'libcontent_shell_content_view',
739             'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
740             'asset_location': '<(ant_build_out)/content_shell/assets',
741           },
742           'conditions': [
743             ['android_webview_build==0', {
744               'dependencies': [
745                 '../tools/imagediff/image_diff.gyp:image_diff#host',
746               ],
747             }],
748           ],
749           'includes': [ '../build/java_apk.gypi' ],
750         },
751       ],
752     }],  # OS=="android"
753   ]