Removes "copy" action for extra_native_libs in java_apk.gypi.
[chromium-blink-merge.git] / content / content_shell.gypi
blob25b4236c7aab73876aa71dbb4251f78f06bf688b
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_SHELL_VERSION="<(content_shell_version)"'],
25       'variables': {
26         'chromium_code': 1,
27       },
28       'dependencies': [
29         'content.gyp:content_app_both',
30         'content.gyp:content_browser',
31         'content.gyp:content_common',
32         'content.gyp:content_gpu',
33         'content.gyp:content_plugin',
34         'content.gyp:content_ppapi_plugin',
35         'content.gyp:content_renderer',
36         'content.gyp:content_utility',
37         'content.gyp:content_worker',
38         'content_resources.gyp:content_resources',
39         'content_shell_resources',
40         'copy_test_netscape_plugin',
41         'layouttest_support_content',
42         '../base/base.gyp:base',
43         '../base/base.gyp:base_static',
44         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
45         '../cc/cc.gyp:cc',
46         '../components/components.gyp:breakpad_component',
47         '../gin/gin.gyp:gin',
48         '../gpu/gpu.gyp:gpu',
49         '../ipc/ipc.gyp:ipc',
50         '../media/media.gyp:media',
51         '../net/net.gyp:net',
52         '../net/net.gyp:net_resources',
53         '../skia/skia.gyp:skia',
54         '../third_party/WebKit/public/blink.gyp:blink',
55         '../third_party/WebKit/public/blink.gyp:blink_web_test_support',
56         '../ui/base/ui_base.gyp:ui_base',
57         '../ui/events/events.gyp:events_base',
58         '../ui/gfx/gfx.gyp:gfx',
59         '../ui/gfx/gfx.gyp:gfx_geometry',
60         '../ui/gl/gl.gyp:gl',
61         '../url/url.gyp:url_lib',
62         '../v8/tools/gyp/v8.gyp:v8',
63         '../webkit/common/webkit_common.gyp:webkit_common',
64         '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings',
65         '../webkit/storage_browser.gyp:webkit_storage_browser',
66         '../webkit/webkit_resources.gyp:webkit_resources',
67       ],
68       'include_dirs': [
69         '..',
70       ],
71       'sources': [
72         'shell/android/shell_jni_registrar.cc',
73         'shell/android/shell_jni_registrar.h',
74         'shell/android/shell_manager.cc',
75         'shell/android/shell_manager.h',
76         'shell/app/paths_mac.h',
77         'shell/app/paths_mac.mm',
78         'shell/app/shell_breakpad_client.cc',
79         'shell/app/shell_breakpad_client.h',
80         'shell/app/shell_main_delegate.cc',
81         'shell/app/shell_main_delegate.h',
82         'shell/app/shell_main_delegate_mac.h',
83         'shell/app/shell_main_delegate_mac.mm',
84         'shell/app/webkit_test_platform_support_android.cc',
85         'shell/app/webkit_test_platform_support.h',
86         'shell/app/webkit_test_platform_support_linux.cc',
87         'shell/app/webkit_test_platform_support_mac.mm',
88         'shell/app/webkit_test_platform_support_win.cc',
89         'shell/browser/notify_done_forwarder.cc',
90         'shell/browser/notify_done_forwarder.h',
91         'shell/browser/shell_android.cc',
92         'shell/browser/shell_application_mac.h',
93         'shell/browser/shell_application_mac.mm',
94         'shell/browser/shell_aura.cc',
95         'shell/browser/shell_browser_context.cc',
96         'shell/browser/shell_browser_context.h',
97         'shell/browser/shell_browser_main.cc',
98         'shell/browser/shell_browser_main.h',
99         'shell/browser/shell_browser_main_parts.cc',
100         'shell/browser/shell_browser_main_parts.h',
101         'shell/browser/shell_browser_main_parts_mac.mm',
102         'shell/browser/shell.cc',
103         'shell/browser/shell_content_browser_client.cc',
104         'shell/browser/shell_content_browser_client.h',
105         'shell/browser/shell_devtools_delegate.cc',
106         'shell/browser/shell_devtools_delegate.h',
107         'shell/browser/shell_devtools_frontend.cc',
108         'shell/browser/shell_devtools_frontend.h',
109         'shell/browser/shell_download_manager_delegate.cc',
110         'shell/browser/shell_download_manager_delegate.h',
111         'shell/browser/shell_gtk.cc',
112         'shell/browser/shell.h',
113         'shell/browser/shell_javascript_dialog_gtk.cc',
114         'shell/browser/shell_javascript_dialog.h',
115         'shell/browser/shell_javascript_dialog_mac.mm',
116         'shell/browser/shell_javascript_dialog_manager.cc',
117         'shell/browser/shell_javascript_dialog_manager.h',
118         'shell/browser/shell_javascript_dialog_win.cc',
119         'shell/browser/shell_layout_tests_android.cc',
120         'shell/browser/shell_layout_tests_android.h',
121         'shell/browser/shell_login_dialog.cc',
122         'shell/browser/shell_login_dialog_gtk.cc',
123         'shell/browser/shell_login_dialog.h',
124         'shell/browser/shell_login_dialog_mac.mm',
125         'shell/browser/shell_mac.mm',
126         'shell/browser/shell_message_filter.cc',
127         'shell/browser/shell_message_filter.h',
128         'shell/browser/shell_net_log.cc',
129         'shell/browser/shell_net_log.h',
130         'shell/browser/shell_network_delegate.cc',
131         'shell/browser/shell_network_delegate.h',
132         'shell/browser/shell_platform_data_aura.cc',
133         'shell/browser/shell_platform_data_aura.h',
134         'shell/browser/shell_plugin_service_filter.cc',
135         'shell/browser/shell_plugin_service_filter.h',
136         'shell/browser/shell_quota_permission_context.cc',
137         'shell/browser/shell_quota_permission_context.h',
138         'shell/browser/shell_resource_dispatcher_host_delegate.cc',
139         'shell/browser/shell_resource_dispatcher_host_delegate.h',
140         'shell/browser/shell_speech_recognition_manager_delegate.cc',
141         'shell/browser/shell_speech_recognition_manager_delegate.h',
142         'shell/browser/shell_url_request_context_getter.cc',
143         'shell/browser/shell_url_request_context_getter.h',
144         'shell/browser/shell_views.cc',
145         'shell/browser/shell_web_contents_view_delegate_android.cc',
146         'shell/browser/shell_web_contents_view_delegate_creator.h',
147         'shell/browser/shell_web_contents_view_delegate_gtk.cc',
148         'shell/browser/shell_web_contents_view_delegate.h',
149         'shell/browser/shell_web_contents_view_delegate_mac.mm',
150         'shell/browser/shell_web_contents_view_delegate_win.cc',
151         'shell/browser/webkit_test_controller.cc',
152         'shell/browser/webkit_test_controller.h',
153         'shell/common/leak_detection_result.h',
154         'shell/common/shell_content_client.cc',
155         'shell/common/shell_content_client.h',
156         'shell/common/shell_messages.cc',
157         'shell/common/shell_messages.h',
158         'shell/common/shell_switches.cc',
159         'shell/common/shell_switches.h',
160         'shell/common/shell_test_configuration.cc',
161         'shell/common/shell_test_configuration.h',
162         'shell/common/test_runner/test_preferences.cc',
163         'shell/common/test_runner/test_preferences.h',
164         'shell/common/webkit_test_helpers.cc',
165         'shell/common/webkit_test_helpers.h',
166         'shell/geolocation/shell_access_token_store.cc',
167         'shell/geolocation/shell_access_token_store.h',
168         'shell/renderer/gc_controller.cc',
169         'shell/renderer/gc_controller.h',
170         'shell/renderer/leak_detector.cc',
171         'shell/renderer/leak_detector.h',
172         'shell/renderer/shell_content_renderer_client.cc',
173         'shell/renderer/shell_content_renderer_client.h',
174         'shell/renderer/shell_render_frame_observer.cc',
175         'shell/renderer/shell_render_frame_observer.h',
176         'shell/renderer/shell_render_process_observer.cc',
177         'shell/renderer/shell_render_process_observer.h',
178         'shell/renderer/shell_render_view_observer.cc',
179         'shell/renderer/shell_render_view_observer.h',
180         'shell/renderer/test_runner/key_code_mapping.cc',
181         'shell/renderer/test_runner/key_code_mapping.h',
182         'shell/renderer/test_runner/MockColorChooser.cpp',
183         'shell/renderer/test_runner/MockColorChooser.h',
184         'shell/renderer/test_runner/MockConstraints.cpp',
185         'shell/renderer/test_runner/MockConstraints.h',
186         'shell/renderer/test_runner/MockGrammarCheck.cpp',
187         'shell/renderer/test_runner/MockGrammarCheck.h',
188         'shell/renderer/test_runner/MockSpellCheck.cpp',
189         'shell/renderer/test_runner/MockSpellCheck.h',
190         'shell/renderer/test_runner/MockWebAudioDevice.cpp',
191         'shell/renderer/test_runner/MockWebAudioDevice.h',
192         'shell/renderer/test_runner/MockWebMIDIAccessor.cpp',
193         'shell/renderer/test_runner/MockWebMIDIAccessor.h',
194         'shell/renderer/test_runner/MockWebMediaStreamCenter.cpp',
195         'shell/renderer/test_runner/MockWebMediaStreamCenter.h',
196         'shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp',
197         'shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h',
198         'shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp',
199         'shell/renderer/test_runner/MockWebRTCDataChannelHandler.h',
200         'shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp',
201         'shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h',
202         'shell/renderer/test_runner/MockWebSpeechInputController.cpp',
203         'shell/renderer/test_runner/MockWebSpeechInputController.h',
204         'shell/renderer/test_runner/MockWebSpeechRecognizer.cpp',
205         'shell/renderer/test_runner/MockWebSpeechRecognizer.h',
206         'shell/renderer/test_runner/SpellCheckClient.cpp',
207         'shell/renderer/test_runner/SpellCheckClient.h',
208         'shell/renderer/test_runner/TestCommon.cpp',
209         'shell/renderer/test_runner/TestCommon.h',
210         'shell/renderer/test_runner/TestInterfaces.cpp',
211         'shell/renderer/test_runner/TestInterfaces.h',
212         'shell/renderer/test_runner/TestPlugin.cpp',
213         'shell/renderer/test_runner/TestPlugin.h',
214         'shell/renderer/test_runner/WebFrameTestProxy.h',
215         'shell/renderer/test_runner/WebPermissions.cpp',
216         'shell/renderer/test_runner/WebPermissions.h',
217         'shell/renderer/test_runner/WebTask.cpp',
218         'shell/renderer/test_runner/WebTask.h',
219         'shell/renderer/test_runner/WebTestDelegate.h',
220         'shell/renderer/test_runner/WebTestInterfaces.cpp',
221         'shell/renderer/test_runner/WebTestInterfaces.h',
222         'shell/renderer/test_runner/WebTestProxy.cpp',
223         'shell/renderer/test_runner/WebTestProxy.h',
224         'shell/renderer/test_runner/WebTestRunner.h',
225         'shell/renderer/test_runner/WebTestThemeEngineMac.h',
226         'shell/renderer/test_runner/WebTestThemeEngineMac.mm',
227         'shell/renderer/test_runner/WebTestThemeEngineMock.cpp',
228         'shell/renderer/test_runner/WebTestThemeEngineMock.h',
229         'shell/renderer/test_runner/WebUserMediaClientMock.cpp',
230         'shell/renderer/test_runner/WebUserMediaClientMock.h',
231         'shell/renderer/test_runner/accessibility_controller.cc',
232         'shell/renderer/test_runner/accessibility_controller.h',
233         'shell/renderer/test_runner/event_sender.cc',
234         'shell/renderer/test_runner/event_sender.h',
235         'shell/renderer/test_runner/gamepad_controller.cc',
236         'shell/renderer/test_runner/gamepad_controller.h',
237         'shell/renderer/test_runner/notification_presenter.cc',
238         'shell/renderer/test_runner/notification_presenter.h',
239         'shell/renderer/test_runner/test_runner.cc',
240         'shell/renderer/test_runner/test_runner.h',
241         'shell/renderer/test_runner/text_input_controller.cc',
242         'shell/renderer/test_runner/text_input_controller.h',
243         'shell/renderer/test_runner/web_ax_object_proxy.cc',
244         'shell/renderer/test_runner/web_ax_object_proxy.h',
245         'shell/renderer/webkit_test_runner.cc',
246         'shell/renderer/webkit_test_runner.h',
247       ],
248       'msvs_settings': {
249         'VCLinkerTool': {
250           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
251         },
252       },
253       'conditions': [
254         ['OS=="mac"', {
255           'sources/': [
256             ['exclude', 'WebTestThemeEngineMock.cpp'],
257           ],
258         }],
259         ['OS=="win" and win_use_allocator_shim==1', {
260           'dependencies': [
261             '../base/allocator/allocator.gyp:allocator',
262           ],
263         }],
264         ['OS=="win"', {
265           'resource_include_dirs': [
266             '<(SHARED_INTERMEDIATE_DIR)/webkit',
267           ],
268           'dependencies': [
269             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
270           ],
271           'configurations': {
272             'Debug_Base': {
273               'msvs_settings': {
274                 'VCLinkerTool': {
275                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
276                 },
277               },
278             },
279           },
280           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
281           'msvs_disabled_warnings': [ 4267, ],
282         }, {  # OS!="win"
283           'sources/': [
284             ['exclude', 'Win\\.cpp$'],
285           ],
286         }],  # OS=="win"
287         ['OS=="linux"', {
288           'dependencies': [
289             '../build/linux/system.gyp:fontconfig',
290           ],
291         }],
292         ['use_x11 == 1', {
293           'dependencies': [
294             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
295           ],
296         }],
297         ['OS=="android"', {
298           'dependencies': [
299             'content_shell_jni_headers',
300           ],
301           'dependencies!': [
302             'copy_test_netscape_plugin',
303           ],
304         }],  # OS=="android"
305         ['os_posix == 1 and OS != "mac" and android_webview_build != 1', {
306           'dependencies': [
307             '../components/components.gyp:breakpad_host',
308           ],
309         }],
310         # TODO(dmikurube): Kill {linux|android}_use_tcmalloc. http://crbug.com/345554
311         ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and ((OS=="linux" and linux_use_tcmalloc==1) or (OS=="android" and android_use_tcmalloc==1)))', {
312           'dependencies': [
313             # This is needed by content/app/content_main_runner.cc
314             '../base/allocator/allocator.gyp:allocator',
315           ],
316         }],
317         ['use_aura==1', {
318           'dependencies': [
319             '../ui/aura/aura.gyp:aura',
320             '../ui/aura/aura.gyp:aura_test_support',
321             '../ui/base/strings/ui_strings.gyp:ui_strings',
322             '../ui/events/events.gyp:events',
323           ],
324           'sources/': [
325             ['exclude', 'shell/browser/shell_gtk.cc'],
326           ],
327           'conditions': [
328             ['toolkit_views==1', {
329               'dependencies': [
330                 '../ui/resources/ui_resources.gyp:ui_resources',
331                 '../ui/views/controls/webview/webview.gyp:webview',
332                 '../ui/views/views.gyp:views',
333                 '../ui/views/views.gyp:views_test_support',
334                 '../ui/wm/wm.gyp:wm_core',
335               ],
336               'sources/': [
337                 ['exclude', 'shell/browser/shell_aura.cc'],
338               ],
339             }, {
340               'sources/': [
341                 ['exclude', 'shell/browser/shell_views.cc'],
342               ],
343             }],
344           ],
345         }, {
346           'sources/': [
347             ['exclude', 'shell/browser/shell_aura.cc'],
348             ['exclude', 'shell/browser/shell_views.cc'],
349           ],
350         }],  # use_aura==1
351         # The test plugin relies on X11.
352         ['OS=="linux" and use_x11==0', {
353           'dependencies!': [
354             'copy_test_netscape_plugin',
355           ],
356         }],
357         ['chromeos==1', {
358           'dependencies': [
359             '../chromeos/chromeos.gyp:chromeos',
360             '../ui/wm/wm.gyp:wm_test_support',
361            ],
362         }], # chromeos==1
363         ['use_custom_freetype==1', {
364           'dependencies': [
365              '../third_party/freetype2/freetype2.gyp:freetype2',
366           ],
367         }],
368         ['enable_plugins==0', {
369           'sources/': [
370             ['exclude', 'shell/browser/shell_plugin_service_filter.cc'],
371             ['exclude', 'shell/browser/shell_plugin_service_filter.h'],
372           ],
373         }]
374       ],
375     },
376     {
377       'target_name': 'content_shell_resources',
378       'type': 'none',
379       'dependencies': [
380         'generate_content_shell_resources',
381       ],
382       'variables': {
383         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
384       },
385       'includes': [ '../build/grit_target.gypi' ],
386       'copies': [
387         {
388           'destination': '<(PRODUCT_DIR)',
389           'files': [
390             '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
391           ],
392         },
393       ],
394       'conditions': [
395         ['OS=="win"', {
396           'copies': [{
397             'destination': '<(PRODUCT_DIR)',
398             'files': ['shell/renderer/test_runner/resources/fonts/AHEM____.TTF'],
399           }],
400         }],
401         ['OS=="mac"', {
402           'all_dependent_settings': {
403             'mac_bundle_resources': [
404               'shell/renderer/test_runner/resources/fonts/AHEM____.TTF',
405               'shell/renderer/test_runner/resources/fonts/ChromiumAATTest.ttf',
406               '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
407               '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
408             ],
409           },
410         }],
411         ['use_x11 == 1', {
412           'copies': [{
413             'destination': '<(PRODUCT_DIR)',
414             'files': [
415               'shell/renderer/test_runner/resources/fonts/AHEM____.TTF',
416               'shell/renderer/test_runner/resources/fonts/fonts.conf',
417             ]
418           }],
419         }],
420         ['OS=="android"', {
421           'copies': [{
422             'destination': '<(PRODUCT_DIR)',
423             'files': [
424               'shell/renderer/test_runner/resources/fonts/AHEM____.TTF',
425               'shell/renderer/test_runner/resources/fonts/android_main_fonts.xml',
426               'shell/renderer/test_runner/resources/fonts/android_fallback_fonts.xml',
427             ]
428           }],
429         }],
430       ],
431     },
432     {
433       'target_name': 'generate_content_shell_resources',
434       'type': 'none',
435       'variables': {
436         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
437       },
438       'actions': [
439         {
440           'action_name': 'content_shell_resources',
441           'variables': {
442             'grit_grd_file': 'shell/shell_resources.grd',
443           },
444           'includes': [ '../build/grit_action.gypi' ],
445         },
446       ],
447     },
448     {
449       # We build a minimal set of resources so WebKit in content_shell has
450       # access to necessary resources.
451       'target_name': 'content_shell_pak',
452       'type': 'none',
453       'dependencies': [
454         'content_resources.gyp:content_resources',
455         'content_shell_resources',
456         '<(DEPTH)/net/net.gyp:net_resources',
457         '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
458         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
459         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
460         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
461       ],
462       'conditions': [
463         ['OS!="android" and OS!="ios"', {
464           'dependencies': [
465             'browser/tracing/tracing_resources.gyp:tracing_resources',
466           ],
467         }],
468         ['OS!="android"', {
469           'dependencies': [
470             'browser/devtools/devtools_resources.gyp:devtools_resources',
471           ],
472         }],
473       ],
474       'actions': [
475         {
476           'action_name': 'repack_content_shell_pack',
477           'variables': {
478             'pak_inputs': [
479               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
480               '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
481               '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
482               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
483               '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
484               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
485               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
486               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
487               '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
488               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
489               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
490             ],
491             'conditions': [
492               ['OS!="android"', {
493                 'variables': {
494                   'pak_inputs': [
495                     '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
496                   ],
497                 },
498                 'pak_output': '<(PRODUCT_DIR)/content_shell.pak',
499               }, {
500                 'pak_output': '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
501               }],
502             ],
503           },
504           'includes': [ '../build/repack_action.gypi' ],
505         },
506       ],
507     },
508     {
509       'target_name': 'content_shell',
510       'type': 'executable',
511       'mac_bundle': 1,
512       'variables': {
513         'chromium_code': 1,
514       },
515       'dependencies': [
516         'content_shell_lib',
517         'content_shell_pak',
518         '../third_party/mesa/mesa.gyp:osmesa',
519         '../tools/imagediff/image_diff.gyp:image_diff',
520       ],
521       'include_dirs': [
522         '..',
523       ],
524       'sources': [
525         'app/startup_helper_win.cc',
526         'shell/app/shell_main.cc',
527       ],
528       'mac_bundle_resources': [
529         'shell/app/app.icns',
530         'shell/app/app-Info.plist',
531       ],
532       # TODO(mark): Come up with a fancier way to do this.  It should only
533       # be necessary to list app-Info.plist once, not the three times it is
534       # listed here.
535       'mac_bundle_resources!': [
536         'shell/app/app-Info.plist',
537       ],
538       'xcode_settings': {
539         'INFOPLIST_FILE': 'shell/app/app-Info.plist',
540       },
541       'msvs_settings': {
542         'VCLinkerTool': {
543           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
544         },
545         'VCManifestTool': {
546           'AdditionalManifestFiles': [
547             'shell/app/shell.exe.manifest',
548           ],
549         },
550       },
551       'conditions': [
552         ['OS=="win" and win_use_allocator_shim==1', {
553           'dependencies': [
554             '../base/allocator/allocator.gyp:allocator',
555           ],
556         }],
557         ['OS=="win"', {
558           'sources': [
559             'shell/app/shell.rc',
560           ],
561           'configurations': {
562             'Debug_Base': {
563               'msvs_settings': {
564                 'VCLinkerTool': {
565                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
566                 },
567               },
568             },
569           },
570           'msvs_large_pdb': 1,
571         }],  # OS=="win"
572         ['OS == "win" or toolkit_uses_gtk == 1', {
573           'dependencies': [
574             '../sandbox/sandbox.gyp:sandbox',
575           ],
576         }],  # OS=="win" or toolkit_uses_gtk == 1
577         ['toolkit_uses_gtk == 1', {
578           'dependencies': [
579             '<(DEPTH)/build/linux/system.gyp:gtk',
580           ],
581         }],  # toolkit_uses_gtk
582         ['OS=="mac"', {
583           'product_name': '<(content_shell_product_name)',
584           'dependencies!': [
585             'content_shell_lib',
586           ],
587           'dependencies': [
588             'content_shell_framework',
589             'content_shell_helper_app',
590           ],
591           'copies': [
592             {
593               'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
594               'files': [
595                 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
596               ],
597             },
598           ],
599           'postbuilds': [
600             {
601               'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
602               'action': [
603                 '../build/mac/copy_framework_unversioned.sh',
604                 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
605                 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
606               ],
607             },
608             {
609               # Modify the Info.plist as needed.
610               'postbuild_name': 'Tweak Info.plist',
611               'action': ['../build/mac/tweak_info_plist.py',
612                          '--scm=1',
613                          '--version=<(content_shell_version)'],
614             },
615             {
616               # This postbuid step is responsible for creating the following
617               # helpers:
618               #
619               # Content Shell Helper EH.app and Content Shell Helper NP.app are
620               # created from Content Shell Helper.app.
621               #
622               # The EH helper is marked for an executable heap. The NP helper
623               # is marked for no PIE (ASLR).
624               'postbuild_name': 'Make More Helpers',
625               'action': [
626                 '../build/mac/make_more_helpers.sh',
627                 'Frameworks',
628                 '<(content_shell_product_name)',
629               ],
630             },
631             {
632               # Make sure there isn't any Objective-C in the shell's
633               # executable.
634               'postbuild_name': 'Verify No Objective-C',
635               'action': [
636                 '../build/mac/verify_no_objc.sh',
637               ],
638             },
639           ],
640         }],  # OS=="mac"
641         ['OS=="android"', {
642           'dependencies!': [
643             '../tools/imagediff/image_diff.gyp:image_diff',
644           ],
645         }],  # OS=="android"
646         ['OS=="android" and android_webview_build==0', {
647           'dependencies': [
648             '../tools/imagediff/image_diff.gyp:image_diff#host',
649           ],
650         }],  # OS=="android" and android_webview_build==0
651       ],
652     },
653     {
654       'target_name': 'content_shell_builder',
655       'type': 'none',
656       'dependencies': [
657         'content_shell',
658       ],
659     },
660     {
661       'target_name': 'layout_test_helper',
662       'type': 'executable',
663       'sources': [
664         'shell/renderer/test_runner/helper/layout_test_helper_mac.mm',
665         'shell/renderer/test_runner/helper/layout_test_helper_win.cc',
666       ],
667       'conditions': [
668         ['OS=="mac"', {
669           'link_settings': {
670             'libraries': [
671               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
672             ],
673           },
674         }],
675       ],
676     },
677     {
678       'target_name': 'test_netscape_plugin',
679       'type': 'loadable_module',
680       'sources': [
681         'shell/tools/plugin/PluginObject.cpp',
682         'shell/tools/plugin/PluginObject.h',
683         'shell/tools/plugin/PluginObjectMac.mm',
684         'shell/tools/plugin/PluginTest.cpp',
685         'shell/tools/plugin/PluginTest.h',
686         'shell/tools/plugin/TestObject.cpp',
687         'shell/tools/plugin/Tests/DocumentOpenInDestroyStream.cpp',
688         'shell/tools/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp',
689         'shell/tools/plugin/Tests/FormValue.cpp',
690         'shell/tools/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp',
691         'shell/tools/plugin/Tests/GetURLWithJavaScriptURL.cpp',
692         'shell/tools/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp',
693         'shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp',
694         'shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp',
695         'shell/tools/plugin/Tests/LogNPPSetWindow.cpp',
696         'shell/tools/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp',
697         'shell/tools/plugin/Tests/NPPNewFails.cpp',
698         'shell/tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp',
699         'shell/tools/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp',
700         'shell/tools/plugin/Tests/NPRuntimeRemoveProperty.cpp',
701         'shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp',
702         'shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp',
703         'shell/tools/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp',
704         'shell/tools/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp',
705         'shell/tools/plugin/main.cpp',
706         'shell/tools/plugin/test_object.h',
707       ],
708       'include_dirs': [
709         '<(DEPTH)',
710         '<(DEPTH)/content/shell/tools/plugin/',
711       ],
712       'dependencies': [
713         '../base/base.gyp:base',
714         '../third_party/npapi/npapi.gyp:npapi',
715       ],
716       'conditions': [
717         ['OS=="mac"', {
718           'mac_bundle': 1,
719           'product_extension': 'plugin',
720           'link_settings': {
721             'libraries': [
722               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
723               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
724               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
725             ]
726           },
727           'xcode_settings': {
728             'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
729             'INFOPLIST_FILE': 'shell/tools/plugin/mac/Info.plist',
730           },
731         }],
732         ['os_posix == 1 and OS != "mac"', {
733           'cflags': [
734             '-fvisibility=default',
735           ],
736         }],
737         ['OS=="win"', {
738           'defines': [
739             # This seems like a hack, but this is what Safari Win does.
740             'snprintf=_snprintf',
741           ],
742           'sources': [
743             'shell/tools/plugin/win/TestNetscapePlugin.def',
744             'shell/tools/plugin/win/TestNetscapePlugin.rc',
745           ],
746           # The .rc file requires that the name of the dll is np_test_netscape_plugin.dll.
747           'product_name': 'np_test_netscape_plugin',
748           # Disable c4267 warnings until we fix size_t to int truncations.
749           'msvs_disabled_warnings': [ 4267, ],
750         }],
751       ],
752     },
753     {
754       'target_name': 'copy_test_netscape_plugin',
755       'type': 'none',
756       'dependencies': [
757         'test_netscape_plugin',
758       ],
759       'conditions': [
760         ['OS=="win"', {
761           'copies': [{
762             'destination': '<(PRODUCT_DIR)/plugins',
763             'files': ['<(PRODUCT_DIR)/np_test_netscape_plugin.dll'],
764           }],
765         }],
766         ['OS=="mac"', {
767           'copies': [{
768             'destination': '<(PRODUCT_DIR)/plugins/',
769             'files': ['<(PRODUCT_DIR)/test_netscape_plugin.plugin/'],
770           }],
771         }],
772         ['os_posix == 1 and OS != "mac"', {
773           'copies': [{
774             'destination': '<(PRODUCT_DIR)/plugins',
775             'files': ['<(PRODUCT_DIR)/libtest_netscape_plugin.so'],
776           }],
777         }],
778       ],
779     }
780   ],
781   'conditions': [
782     ['OS=="mac"', {
783       'targets': [
784         {
785           'target_name': 'content_shell_framework',
786           'type': 'shared_library',
787           'product_name': '<(content_shell_product_name) Framework',
788           'mac_bundle': 1,
789           'mac_bundle_resources': [
790             'shell/app/English.lproj/HttpAuth.xib',
791             'shell/app/English.lproj/MainMenu.xib',
792             '<(PRODUCT_DIR)/content_shell.pak',
793             'shell/app/framework-Info.plist',
794           ],
795           'mac_bundle_resources!': [
796             'shell/app/framework-Info.plist',
797           ],
798           'xcode_settings': {
799             # The framework is placed within the .app's Framework
800             # directory.  DYLIB_INSTALL_NAME_BASE and
801             # LD_DYLIB_INSTALL_NAME affect -install_name.
802             'DYLIB_INSTALL_NAME_BASE':
803                 '@executable_path/../Frameworks',
804             # See /build/mac/copy_framework_unversioned.sh for
805             # information on LD_DYLIB_INSTALL_NAME.
806             'LD_DYLIB_INSTALL_NAME':
807                 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
809             'INFOPLIST_FILE': 'shell/app/framework-Info.plist',
810           },
811           'dependencies': [
812             'content_shell_lib',
813           ],
814           'include_dirs': [
815             '..',
816           ],
817           'sources': [
818             'shell/app/shell_content_main.cc',
819             'shell/app/shell_content_main.h',
820           ],
821           'postbuilds': [
822             {
823               # Modify the Info.plist as needed.  The script explains why
824               # this is needed.  This is also done in the chrome target.
825               # The framework needs the Breakpad keys if this feature is
826               # enabled.  It does not need the Keystone keys; these always
827               # come from the outer application bundle.  The framework
828               # doesn't currently use the SCM keys for anything,
829               # but this seems like a really good place to store them.
830               'postbuild_name': 'Tweak Info.plist',
831               'action': ['../build/mac/tweak_info_plist.py',
832                          '--breakpad=1',
833                          '--keystone=0',
834                          '--scm=1',
835                          '--version=<(content_shell_version)',
836                          '--branding=<(content_shell_product_name)'],
837             },
838           ],
839           'copies': [
840             {
841               # Copy FFmpeg binaries for audio/video support.
842               'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
843               'files': [
844                 '<(PRODUCT_DIR)/ffmpegsumo.so',
845               ],
846             },
847             {
848               'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
849               'files': [
850                 '<(PRODUCT_DIR)/crash_inspector',
851                 '<(PRODUCT_DIR)/crash_report_sender.app'
852               ],
853             },
854           ],
855           'conditions': [
856             ['enable_webrtc==1', {
857               'variables': {
858                 'libpeer_target_type%': 'static_library',
859               },
860               'conditions': [
861                 ['libpeer_target_type!="static_library"', {
862                   'copies': [{
863                    'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
864                    'files': [
865                       '<(PRODUCT_DIR)/libpeerconnection.so',
866                     ],
867                   }],
868                 }],
869               ],
870             }],
871             ['icu_use_data_file_flag==1', {
872               'mac_bundle_resources': [
873                 '<(PRODUCT_DIR)/icudtl.dat',
874               ],
875             }],
876           ],
877         },  # target content_shell_framework
878         {
879           'target_name': 'content_shell_helper_app',
880           'type': 'executable',
881           'variables': { 'enable_wexit_time_destructors': 1, },
882           'product_name': '<(content_shell_product_name) Helper',
883           'mac_bundle': 1,
884           'dependencies': [
885             'content_shell_framework',
886           ],
887           'sources': [
888             'shell/app/shell_main.cc',
889             'shell/app/helper-Info.plist',
890           ],
891           # TODO(mark): Come up with a fancier way to do this.  It should only
892           # be necessary to list helper-Info.plist once, not the three times it
893           # is listed here.
894           'mac_bundle_resources!': [
895             'shell/app/helper-Info.plist',
896           ],
897           # TODO(mark): For now, don't put any resources into this app.  Its
898           # resources directory will be a symbolic link to the browser app's
899           # resources directory.
900           'mac_bundle_resources/': [
901             ['exclude', '.*'],
902           ],
903           'xcode_settings': {
904             'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
905           },
906           'postbuilds': [
907             {
908               # The framework defines its load-time path
909               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
910               # (chrome).  A different relative path needs to be used in
911               # content_shell_helper_app.
912               'postbuild_name': 'Fix Framework Link',
913               'action': [
914                 'install_name_tool',
915                 '-change',
916                 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
917                 '@executable_path/../../../<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
918                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
919               ],
920             },
921             {
922               # Modify the Info.plist as needed.  The script explains why this
923               # is needed.  This is also done in the chrome and chrome_dll
924               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
925               # are used because Breakpad, Keystone, and SCM keys are
926               # never placed into the helper.
927               'postbuild_name': 'Tweak Info.plist',
928               'action': ['../build/mac/tweak_info_plist.py',
929                          '--breakpad=0',
930                          '--keystone=0',
931                          '--scm=0',
932                          '--version=<(content_shell_version)'],
933             },
934             {
935               # Make sure there isn't any Objective-C in the helper app's
936               # executable.
937               'postbuild_name': 'Verify No Objective-C',
938               'action': [
939                 '../build/mac/verify_no_objc.sh',
940               ],
941             },
942           ],
943           'conditions': [
944             ['component=="shared_library"', {
945               'xcode_settings': {
946                 'LD_RUNPATH_SEARCH_PATHS': [
947                   # Get back from Content Shell.app/Contents/Frameworks/
948                   #                                 Helper.app/Contents/MacOS
949                   '@loader_path/../../../../../..',
950                 ],
951               },
952             }],
953           ],
954         },  # target content_shell_helper_app
955       ],
956     }],  # OS=="mac"
957     ['OS=="android"', {
958       'targets': [
959         {
960           # TODO(jrg): Update this action and other jni generators to only
961           # require specifying the java directory and generate the rest.
962           'target_name': 'content_shell_jni_headers',
963           'type': 'none',
964           'sources': [
965             'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
966             'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
967             'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
968             'shell/android/java/src/org/chromium/content_shell/Shell.java',
969           ],
970           'variables': {
971             'jni_gen_package': 'content/shell',
972             'jni_generator_ptr_type': 'long',
973           },
974           'includes': [ '../build/jni_generator.gypi' ],
975         },
976         {
977           'target_name': 'libcontent_shell_content_view',
978           'type': 'shared_library',
979           'dependencies': [
980             'content_shell_jni_headers',
981             'content_shell_lib',
982             'content_shell_pak',
983             # Skia is necessary to ensure the dependencies needed by
984             # WebContents are included.
985             '../skia/skia.gyp:skia',
986             '<(DEPTH)/media/media.gyp:player_android',
987           ],
988           'sources': [
989             'shell/android/shell_library_loader.cc',
990             'shell/android/shell_library_loader.h',
991           ],
992           'conditions': [
993             ['android_webview_build==1', {
994               'ldflags': [
995                 '-lgabi++',  # For rtti
996               ],
997             }],
998           ],
999         },
1000         {
1001           'target_name': 'content_shell_java',
1002           'type': 'none',
1003           'dependencies': [
1004             'content.gyp:content_java',
1005           ],
1006           'variables': {
1007             'java_in_dir': '../content/shell/android/java',
1008             'has_java_resources': 1,
1009             'R_package': 'org.chromium.content_shell',
1010             'R_package_relpath': 'org/chromium/content_shell',
1011           },
1012           'includes': [ '../build/java.gypi' ],
1013         },
1014         {
1015           # content_shell_apk creates a .jar as a side effect. Any java targets
1016           # that need that .jar in their classpath should depend on this target,
1017           # content_shell_apk_java. Dependents of content_shell_apk receive its
1018           # jar path in the variable 'apk_output_jar_path'. This target should
1019           # only be used by targets which instrument content_shell_apk.
1020           'target_name': 'content_shell_apk_java',
1021           'type': 'none',
1022           'dependencies': [
1023             'content_shell_apk',
1024           ],
1025           'includes': [ '../build/apk_fake_jar.gypi' ],
1026         },
1027         {
1028           'target_name': 'content_shell_apk',
1029           'type': 'none',
1030           'dependencies': [
1031             'content.gyp:content_icudata',
1032             'content.gyp:content_java',
1033             'content_java_test_support',
1034             'content_shell_java',
1035             'libcontent_shell_content_view',
1036             '../base/base.gyp:base_java',
1037             '../media/media.gyp:media_java',
1038             '../net/net.gyp:net_java',
1039             '../third_party/mesa/mesa.gyp:osmesa_in_lib_dir',
1040             '../tools/android/forwarder/forwarder.gyp:forwarder',
1041             '../ui/android/ui_android.gyp:ui_java',
1042           ],
1043           'variables': {
1044             'apk_name': 'ContentShell',
1045             'manifest_package_name': 'org.chromium.content_shell_apk',
1046             'java_in_dir': 'shell/android/shell_apk',
1047             'resource_dir': 'shell/android/shell_apk/res',
1048             'native_lib_target': 'libcontent_shell_content_view',
1049             'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
1050             'asset_location': '<(PRODUCT_DIR)/content_shell/assets',
1051             'extra_native_libs': ['<(SHARED_LIB_DIR)/libosmesa.so'],
1052             'conditions': [
1053               ['icu_use_data_file_flag==1', {
1054                 'additional_input_paths': [
1055                   '<(PRODUCT_DIR)/icudtl.dat',
1056                 ],
1057               }],
1058             ],
1059           },
1060           'conditions': [
1061             ['android_webview_build==0', {
1062               'dependencies': [
1063                 '../tools/imagediff/image_diff.gyp:image_diff#host',
1064               ],
1065             }],
1066           ],
1067           'includes': [ '../build/java_apk.gypi' ],
1068         },
1069       ],
1070     }],  # OS=="android"
1071     ['OS=="win"', {
1072       'targets': [
1073         {
1074           'target_name': 'content_shell_crash_service',
1075           'type': 'executable',
1076           'dependencies': [
1077             '../base/base.gyp:base',
1078             '../components/components.gyp:breakpad_crash_service',
1079           ],
1080           'include_dirs': [
1081             '..',
1082           ],
1083           'sources': [
1084             'shell/tools/content_shell_crash_service.cc',
1085           ],
1086           'msvs_settings': {
1087             'VCLinkerTool': {
1088               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1089             },
1090           },
1091         },
1092       ],
1093     }],  # OS=="win"
1094     ['OS=="win" and fastbuild==0 and target_arch=="ia32"', {
1095       'variables': {
1096         'dest_dir': '<(PRODUCT_DIR)/syzygy',
1097       },
1098       'targets': [
1099         {
1100           'target_name': 'content_shell_syzyasan',
1101           'type': 'none',
1102           'sources' : [],
1103           # Instrument content_shell with SyzyAsan.
1104           'actions': [
1105             {
1106               'action_name': 'Instrument content_shell with SyzyAsan',
1107               'inputs': [
1108                 '<(PRODUCT_DIR)/content_shell.exe',
1109               ],
1110               'outputs': [
1111                 '<(dest_dir)/content_shell.exe',
1112                 '<(dest_dir)/content_shell.exe.pdb',
1113               ],
1114               'action': [
1115                 'python',
1116                 '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py',
1117                 '--mode', 'asan',
1118                 '--input_executable', '<(PRODUCT_DIR)/content_shell.exe',
1119                 '--input_symbol', '<(PRODUCT_DIR)/content_shell.exe.pdb',
1120                 '--destination_dir', '<(dest_dir)',
1121               ],
1122             },
1123           ],
1124         },
1125       ],
1126     }],  # OS=="win" and fastbuild==0 and target_arch=="ia32"
1127   ]