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