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