Renaming RMQStore to GCMStore and breaking out its interface
[chromium-blink-merge.git] / content / content_shell.gypi
blobe8b3a7c8d770b29b49b70547a17dcaf1c4231a75
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_shell_resources',
39         'test_support_content',
40         'content_resources.gyp:content_resources',
41         '../base/base.gyp:base',
42         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
43         '../components/components.gyp:breakpad_component',
44         '../ipc/ipc.gyp:ipc',
45         '../media/media.gyp:media',
46         '../net/net.gyp:net',
47         '../net/net.gyp:net_resources',
48         '../skia/skia.gyp:skia',
49         '../third_party/WebKit/public/blink.gyp:blink',
50         '../third_party/WebKit/public/blink_test_runner.gyp:blink_test_runner_resources',
51         '../third_party/WebKit/public/blink_test_runner.gyp:blink_test_support',
52         '../ui/events/events.gyp:events_base',
53         '../ui/gfx/gfx.gyp:gfx',
54         '../ui/gfx/gfx.gyp:gfx_geometry',
55         '../ui/gl/gl.gyp:gl',
56         '../ui/ui.gyp:ui',
57         '../url/url.gyp:url_lib',
58         '../v8/tools/gyp/v8.gyp:v8',
59         '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent',
60         '../webkit/common/webkit_common.gyp:webkit_common',
61         '../webkit/glue/webkit_glue.gyp:glue',
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_plugin_service_filter.cc',
130         'shell/browser/shell_plugin_service_filter.h',
131         'shell/browser/shell_quota_permission_context.cc',
132         'shell/browser/shell_quota_permission_context.h',
133         'shell/browser/shell_resource_dispatcher_host_delegate.cc',
134         'shell/browser/shell_resource_dispatcher_host_delegate.h',
135         'shell/browser/shell_speech_recognition_manager_delegate.cc',
136         'shell/browser/shell_speech_recognition_manager_delegate.h',
137         'shell/browser/shell_url_request_context_getter.cc',
138         'shell/browser/shell_url_request_context_getter.h',
139         'shell/browser/shell_views.cc',
140         'shell/browser/shell_web_contents_view_delegate_android.cc',
141         'shell/browser/shell_web_contents_view_delegate_creator.h',
142         'shell/browser/shell_web_contents_view_delegate_gtk.cc',
143         'shell/browser/shell_web_contents_view_delegate.h',
144         'shell/browser/shell_web_contents_view_delegate_mac.mm',
145         'shell/browser/shell_web_contents_view_delegate_win.cc',
146         'shell/browser/shell_win.cc',
147         'shell/browser/webkit_test_controller.cc',
148         'shell/browser/webkit_test_controller.h',
149         'shell/common/shell_content_client.cc',
150         'shell/common/shell_content_client.h',
151         'shell/common/shell_messages.cc',
152         'shell/common/shell_messages.h',
153         'shell/common/shell_switches.cc',
154         'shell/common/shell_switches.h',
155         'shell/common/shell_test_configuration.cc',
156         'shell/common/shell_test_configuration.h',
157         'shell/common/test_runner/WebPreferences.cpp',
158         'shell/common/test_runner/WebPreferences.h',
159         'shell/common/webkit_test_helpers.cc',
160         'shell/common/webkit_test_helpers.h',
161         'shell/geolocation/shell_access_token_store.cc',
162         'shell/geolocation/shell_access_token_store.h',
163         'shell/renderer/gc_extension.cc',
164         'shell/renderer/gc_extension.h',
165         'shell/renderer/shell_content_renderer_client.cc',
166         'shell/renderer/shell_content_renderer_client.h',
167         'shell/renderer/shell_render_frame_observer.cc',
168         'shell/renderer/shell_render_frame_observer.h',
169         'shell/renderer/shell_render_process_observer.cc',
170         'shell/renderer/shell_render_process_observer.h',
171         'shell/renderer/shell_render_view_observer.cc',
172         'shell/renderer/shell_render_view_observer.h',
173         'shell/renderer/test_runner/AccessibilityController.cpp',
174         'shell/renderer/test_runner/AccessibilityController.h',
175         'shell/renderer/test_runner/CppBoundClass.cpp',
176         'shell/renderer/test_runner/CppBoundClass.h',
177         'shell/renderer/test_runner/CppVariant.cpp',
178         'shell/renderer/test_runner/CppVariant.h',
179         'shell/renderer/test_runner/EventSender.cpp',
180         'shell/renderer/test_runner/EventSender.h',
181         'shell/renderer/test_runner/GamepadController.cpp',
182         'shell/renderer/test_runner/GamepadController.h',
183         'shell/renderer/test_runner/KeyCodeMapping.cpp',
184         'shell/renderer/test_runner/KeyCodeMapping.h',
185         'shell/renderer/test_runner/MockColorChooser.cpp',
186         'shell/renderer/test_runner/MockColorChooser.h',
187         'shell/renderer/test_runner/MockConstraints.cpp',
188         'shell/renderer/test_runner/MockConstraints.h',
189         'shell/renderer/test_runner/MockGrammarCheck.cpp',
190         'shell/renderer/test_runner/MockGrammarCheck.h',
191         'shell/renderer/test_runner/MockSpellCheck.cpp',
192         'shell/renderer/test_runner/MockSpellCheck.h',
193         'shell/renderer/test_runner/MockWebAudioDevice.cpp',
194         'shell/renderer/test_runner/MockWebAudioDevice.h',
195         'shell/renderer/test_runner/MockWebMIDIAccessor.cpp',
196         'shell/renderer/test_runner/MockWebMIDIAccessor.h',
197         'shell/renderer/test_runner/MockWebMediaStreamCenter.cpp',
198         'shell/renderer/test_runner/MockWebMediaStreamCenter.h',
199         'shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp',
200         'shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h',
201         'shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp',
202         'shell/renderer/test_runner/MockWebRTCDataChannelHandler.h',
203         'shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp',
204         'shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h',
205         'shell/renderer/test_runner/MockWebSpeechInputController.cpp',
206         'shell/renderer/test_runner/MockWebSpeechInputController.h',
207         'shell/renderer/test_runner/MockWebSpeechRecognizer.cpp',
208         'shell/renderer/test_runner/MockWebSpeechRecognizer.h',
209         'shell/renderer/test_runner/NotificationPresenter.cpp',
210         'shell/renderer/test_runner/NotificationPresenter.h',
211         'shell/renderer/test_runner/SpellCheckClient.cpp',
212         'shell/renderer/test_runner/SpellCheckClient.h',
213         'shell/renderer/test_runner/TestCommon.cpp',
214         'shell/renderer/test_runner/TestCommon.h',
215         'shell/renderer/test_runner/TestInterfaces.cpp',
216         'shell/renderer/test_runner/TestInterfaces.h',
217         'shell/renderer/test_runner/TestPlugin.cpp',
218         'shell/renderer/test_runner/TestPlugin.h',
219         'shell/renderer/test_runner/TestRunner.cpp',
220         'shell/renderer/test_runner/TestRunner.h',
221         'shell/renderer/test_runner/TextInputController.cpp',
222         'shell/renderer/test_runner/TextInputController.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/WebTestThemeControlWin.cpp',
237         'shell/renderer/test_runner/WebTestThemeControlWin.h',
238         'shell/renderer/test_runner/WebTestThemeEngineMac.h',
239         'shell/renderer/test_runner/WebTestThemeEngineMac.mm',
240         'shell/renderer/test_runner/WebTestThemeEngineMock.cpp',
241         'shell/renderer/test_runner/WebTestThemeEngineMock.h',
242         'shell/renderer/test_runner/WebTestThemeEngineWin.cpp',
243         'shell/renderer/test_runner/WebTestThemeEngineWin.h',
244         'shell/renderer/test_runner/WebUserMediaClientMock.cpp',
245         'shell/renderer/test_runner/WebUserMediaClientMock.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=="win" and win_use_allocator_shim==1', {
257           'dependencies': [
258             '../base/allocator/allocator.gyp:allocator',
259           ],
260         }],
261         ['OS=="win"', {
262           'resource_include_dirs': [
263             '<(SHARED_INTERMEDIATE_DIR)/webkit',
264           ],
265           'dependencies': [
266             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
267           ],
268           'configurations': {
269             'Debug_Base': {
270               'msvs_settings': {
271                 'VCLinkerTool': {
272                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
273                 },
274               },
275             },
276           },
277           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
278           'msvs_disabled_warnings': [ 4267, ],
279         }, {  # OS!="win"
280           'sources/': [
281             ['exclude', 'Win\\.cpp$'],
282           ],
283         }],  # OS=="win"
284         ['OS=="linux"', {
285           'dependencies': [
286             '../build/linux/system.gyp:fontconfig',
287           ],
288         }],
289         ['OS=="android"', {
290           'dependencies': [
291             'content_shell_jni_headers',
292           ],
293         }, {  # else: OS!="android"
294           'dependencies': [
295             # This dependency is for running DRT against the content shell, and
296             # this combination is not yet supported on Android.
297             'test_support_content',
298           ],
299         }],  # OS=="android"
300         ['os_posix == 1 and OS != "mac" and android_webview_build != 1', {
301           'dependencies': [
302             '../components/components.gyp:breakpad_host',
303           ],
304         }],
305         ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (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/base/strings/ui_strings.gyp:ui_strings',
315           ],
316           'sources/': [
317             ['exclude', 'shell/browser/shell_gtk.cc'],
318             ['exclude', 'shell/browser/shell_win.cc'],
319           ],
320           'conditions': [
321             ['toolkit_views==1', {
322               'dependencies': [
323                 '../ui/resources/ui_resources.gyp:ui_resources',
324                 '../ui/views/controls/webview/webview.gyp:webview',
325                 '../ui/views/views.gyp:views',
326                 '../ui/views/views.gyp:views_test_support',
327               ],
328               'sources/': [
329                 ['exclude', 'shell/browser/shell_aura.cc'],
330               ],
331             }, {
332               'sources/': [
333                 ['exclude', 'shell/browser/shell_views.cc'],
334               ],
335             }],
336           ],
337         }, {
338           'sources/': [
339             ['exclude', 'shell/browser/shell_aura.cc'],
340             ['exclude', 'shell/browser/shell_views.cc'],
341           ],
342         }],  # use_aura==1
343         ['chromeos==1', {
344           'dependencies': [
345             '../chromeos/chromeos.gyp:chromeos',
346             '../ui/wm/wm.gyp:wm_test_support',
347            ],
348         }], # chromeos==1
349         ['use_custom_freetype==1', {
350           'dependencies': [
351              '../third_party/freetype2/freetype2.gyp:freetype2',
352           ],
353         }],
354         ['enable_plugins==0', {
355           'sources/': [
356             ['exclude', 'shell/browser/shell_plugin_service_filter.cc'],
357             ['exclude', 'shell/browser/shell_plugin_service_filter.h'],
358           ],
359         }]
360       ],
361     },
362     {
363       'target_name': 'content_shell_resources',
364       'type': 'none',
365       'dependencies': [
366         'generate_content_shell_resources',
367       ],
368       'variables': {
369         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
370       },
371       'includes': [ '../build/grit_target.gypi' ],
372       'copies': [
373         {
374           'destination': '<(PRODUCT_DIR)',
375           'files': [
376             '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
377           ],
378         },
379       ],
380     },
381     {
382       'target_name': 'generate_content_shell_resources',
383       'type': 'none',
384       'variables': {
385         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
386       },
387       'actions': [
388         {
389           'action_name': 'content_shell_resources',
390           'variables': {
391             'grit_grd_file': 'shell/shell_resources.grd',
392           },
393           'includes': [ '../build/grit_action.gypi' ],
394         },
395       ],
396     },
397     {
398       # We build a minimal set of resources so WebKit in content_shell has
399       # access to necessary resources.
400       'target_name': 'content_shell_pak',
401       'type': 'none',
402       'dependencies': [
403         'content_resources.gyp:content_resources',
404         'content_shell_resources',
405         '<(DEPTH)/net/net.gyp:net_resources',
406         '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
407         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
408         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
409         '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
410       ],
411       'conditions': [
412         ['OS!="android" and OS!="ios"', {
413           'dependencies': [
414             'browser/tracing/tracing_resources.gyp:tracing_resources',
415           ],
416         }],
417         ['OS!="android"', {
418           'dependencies': [
419             'browser/devtools/devtools_resources.gyp:devtools_resources',
420           ],
421         }],
422       ],
423       'variables': {
424         'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
425       },
426       'actions': [
427         {
428           'action_name': 'repack_content_shell_pack',
429           'variables': {
430             'pak_inputs': [
431               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
432               '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
433               '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
434               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
435               '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
436               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
437               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
438               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
439               '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
440               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
441               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
442             ],
443           },
444           'inputs': [
445             '<(repack_path)',
446             '<@(pak_inputs)',
447           ],
448           'action': ['python', '<(repack_path)', '<@(_outputs)',
449                      '<@(pak_inputs)'],
450           'conditions': [
451             ['OS!="android"', {
452               'variables': {
453                 'pak_inputs': [
454                   '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
455                 ],
456               },
457               'outputs': [
458                 '<(PRODUCT_DIR)/content_shell.pak',
459               ],
460             }, {
461               'outputs': [
462                 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak',
463               ],
464             }],
465           ],
466         },
467       ],
468     },
469     {
470       'target_name': 'content_shell',
471       'type': 'executable',
472       'mac_bundle': 1,
473       'variables': {
474         'chromium_code': 1,
475       },
476       'dependencies': [
477         'content_shell_lib',
478         'content_shell_pak',
479         '../third_party/mesa/mesa.gyp:osmesa',
480         '../tools/imagediff/image_diff.gyp:image_diff',
481       ],
482       'include_dirs': [
483         '..',
484       ],
485       'sources': [
486         'app/startup_helper_win.cc',
487         'shell/app/shell_main.cc',
488       ],
489       'mac_bundle_resources': [
490         'shell/app/app.icns',
491         'shell/app/app-Info.plist',
492       ],
493       # TODO(mark): Come up with a fancier way to do this.  It should only
494       # be necessary to list app-Info.plist once, not the three times it is
495       # listed here.
496       'mac_bundle_resources!': [
497         'shell/app/app-Info.plist',
498       ],
499       'xcode_settings': {
500         'INFOPLIST_FILE': 'shell/app/app-Info.plist',
501       },
502       'msvs_settings': {
503         'VCLinkerTool': {
504           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
505         },
506         'VCManifestTool': {
507           'AdditionalManifestFiles': [
508             'shell/app/shell.exe.manifest',
509           ],
510         },
511       },
512       'conditions': [
513         ['OS=="win" and win_use_allocator_shim==1', {
514           'dependencies': [
515             '../base/allocator/allocator.gyp:allocator',
516           ],
517         }],
518         ['OS=="win"', {
519           'sources': [
520             'shell/app/shell.rc',
521           ],
522           'configurations': {
523             'Debug_Base': {
524               'msvs_settings': {
525                 'VCLinkerTool': {
526                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
527                 },
528               },
529             },
530           },
531         }],  # OS=="win"
532         ['OS == "win" or toolkit_uses_gtk == 1', {
533           'dependencies': [
534             '../sandbox/sandbox.gyp:sandbox',
535           ],
536         }],  # OS=="win" or toolkit_uses_gtk == 1
537         ['toolkit_uses_gtk == 1', {
538           'dependencies': [
539             '<(DEPTH)/build/linux/system.gyp:gtk',
540           ],
541         }],  # toolkit_uses_gtk
542         ['OS=="mac"', {
543           'product_name': '<(content_shell_product_name)',
544           'dependencies!': [
545             'content_shell_lib',
546           ],
547           'dependencies': [
548             'content_shell_framework',
549             'content_shell_helper_app',
550           ],
551           'copies': [
552             {
553               'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks',
554               'files': [
555                 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app',
556               ],
557             },
558           ],
559           'postbuilds': [
560             {
561               'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
562               'action': [
563                 '../build/mac/copy_framework_unversioned.sh',
564                 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
565                 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
566               ],
567             },
568             {
569               # Modify the Info.plist as needed.
570               'postbuild_name': 'Tweak Info.plist',
571               'action': ['../build/mac/tweak_info_plist.py',
572                          '--scm=1',
573                          '--version=<(content_shell_version)'],
574             },
575             {
576               # This postbuid step is responsible for creating the following
577               # helpers:
578               #
579               # Content Shell Helper EH.app and Content Shell Helper NP.app are
580               # created from Content Shell Helper.app.
581               #
582               # The EH helper is marked for an executable heap. The NP helper
583               # is marked for no PIE (ASLR).
584               'postbuild_name': 'Make More Helpers',
585               'action': [
586                 '../build/mac/make_more_helpers.sh',
587                 'Frameworks',
588                 '<(content_shell_product_name)',
589               ],
590             },
591             {
592               # Make sure there isn't any Objective-C in the shell's
593               # executable.
594               'postbuild_name': 'Verify No Objective-C',
595               'action': [
596                 '../build/mac/verify_no_objc.sh',
597               ],
598             },
599           ],
600         }],  # OS=="mac"
601         ['OS=="android"', {
602           'dependencies!': [
603             '../tools/imagediff/image_diff.gyp:image_diff',
604           ],
605         }],  # OS=="android"
606         ['OS=="android" and android_webview_build==0', {
607           'dependencies': [
608             '../tools/imagediff/image_diff.gyp:image_diff#host',
609           ],
610         }],  # OS=="android" and android_webview_build==0
611       ],
612     },
613     {
614       'target_name': 'content_shell_builder',
615       'type': 'none',
616       'dependencies': [
617         'content_shell',
618       ],
619     },
620     {
621       'target_name': 'layout_test_helper',
622       'type': 'executable',
623       'sources': [
624         'shell/renderer/test_runner/helper/layout_test_helper_mac.mm',
625         'shell/renderer/test_runner/helper/layout_test_helper_win.cc',
626       ],
627       'conditions': [
628         ['OS=="mac"', {
629           'link_settings': {
630             'libraries': [
631               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
632             ],
633           },
634         }],
635       ],
636     },
637   ],
638   'conditions': [
639     ['OS=="mac"', {
640       'targets': [
641         {
642           'target_name': 'content_shell_framework',
643           'type': 'shared_library',
644           'product_name': '<(content_shell_product_name) Framework',
645           'mac_bundle': 1,
646           'mac_bundle_resources': [
647             'shell/app/English.lproj/HttpAuth.xib',
648             'shell/app/English.lproj/MainMenu.xib',
649             '<(PRODUCT_DIR)/content_shell.pak',
650             'shell/app/framework-Info.plist',
651           ],
652           'mac_bundle_resources!': [
653             'shell/app/framework-Info.plist',
654           ],
655           'xcode_settings': {
656             # The framework is placed within the .app's Framework
657             # directory.  DYLIB_INSTALL_NAME_BASE and
658             # LD_DYLIB_INSTALL_NAME affect -install_name.
659             'DYLIB_INSTALL_NAME_BASE':
660                 '@executable_path/../Frameworks',
661             # See /build/mac/copy_framework_unversioned.sh for
662             # information on LD_DYLIB_INSTALL_NAME.
663             'LD_DYLIB_INSTALL_NAME':
664                 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
666             'INFOPLIST_FILE': 'shell/app/framework-Info.plist',
667           },
668           'dependencies': [
669             'content_shell_lib',
670           ],
671           'include_dirs': [
672             '..',
673           ],
674           'sources': [
675             'shell/app/shell_content_main.cc',
676             'shell/app/shell_content_main.h',
677           ],
678          'postbuilds': [
679            {
680              # Modify the Info.plist as needed.  The script explains why
681              # this is needed.  This is also done in the chrome target.
682              # The framework needs the Breakpad keys if this feature is
683              # enabled.  It does not need the Keystone keys; these always
684              # come from the outer application bundle.  The framework
685              # doesn't currently use the SCM keys for anything,
686              # but this seems like a really good place to store them.
687              'postbuild_name': 'Tweak Info.plist',
688              'action': ['../build/mac/tweak_info_plist.py',
689                         '--breakpad=1',
690                         '--keystone=0',
691                         '--scm=1',
692                         '--version=<(content_shell_version)',
693                         '--branding=<(content_shell_product_name)'],
694            },
695          ],
696           'copies': [
697             {
698               # Copy FFmpeg binaries for audio/video support.
699               'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
700               'files': [
701                 '<(PRODUCT_DIR)/ffmpegsumo.so',
702               ],
703             },
704             {
705               'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
706               'files': [
707                 '<(PRODUCT_DIR)/crash_inspector',
708                 '<(PRODUCT_DIR)/crash_report_sender.app'
709               ],
710             },
711           ],
712           'conditions': [
713             ['enable_webrtc==1', {
714               'variables': {
715                 'libpeer_target_type%': 'static_library',
716               },
717               'conditions': [
718                 ['libpeer_target_type!="static_library"', {
719                   'copies': [{
720                    'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
721                    'files': [
722                       '<(PRODUCT_DIR)/libpeerconnection.so',
723                     ],
724                   }],
725                 }],
726               ],
727             }],
728           ],
729         },  # target content_shell_framework
730         {
731           'target_name': 'content_shell_helper_app',
732           'type': 'executable',
733           'variables': { 'enable_wexit_time_destructors': 1, },
734           'product_name': '<(content_shell_product_name) Helper',
735           'mac_bundle': 1,
736           'dependencies': [
737             'content_shell_framework',
738           ],
739           'sources': [
740             'shell/app/shell_main.cc',
741             'shell/app/helper-Info.plist',
742           ],
743           # TODO(mark): Come up with a fancier way to do this.  It should only
744           # be necessary to list helper-Info.plist once, not the three times it
745           # is listed here.
746           'mac_bundle_resources!': [
747             'shell/app/helper-Info.plist',
748           ],
749           # TODO(mark): For now, don't put any resources into this app.  Its
750           # resources directory will be a symbolic link to the browser app's
751           # resources directory.
752           'mac_bundle_resources/': [
753             ['exclude', '.*'],
754           ],
755           'xcode_settings': {
756             'INFOPLIST_FILE': 'shell/app/helper-Info.plist',
757           },
758           'postbuilds': [
759             {
760               # The framework defines its load-time path
761               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
762               # (chrome).  A different relative path needs to be used in
763               # content_shell_helper_app.
764               'postbuild_name': 'Fix Framework Link',
765               'action': [
766                 'install_name_tool',
767                 '-change',
768                 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
769                 '@executable_path/../../../<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
770                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
771               ],
772             },
773             {
774               # Modify the Info.plist as needed.  The script explains why this
775               # is needed.  This is also done in the chrome and chrome_dll
776               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
777               # are used because Breakpad, Keystone, and SCM keys are
778               # never placed into the helper.
779               'postbuild_name': 'Tweak Info.plist',
780               'action': ['../build/mac/tweak_info_plist.py',
781                          '--breakpad=0',
782                          '--keystone=0',
783                          '--scm=0',
784                          '--version=<(content_shell_version)'],
785             },
786             {
787               # Make sure there isn't any Objective-C in the helper app's
788               # executable.
789               'postbuild_name': 'Verify No Objective-C',
790               'action': [
791                 '../build/mac/verify_no_objc.sh',
792               ],
793             },
794           ],
795           'conditions': [
796             ['component=="shared_library"', {
797               'xcode_settings': {
798                 'LD_RUNPATH_SEARCH_PATHS': [
799                   # Get back from Content Shell.app/Contents/Frameworks/
800                   #                                 Helper.app/Contents/MacOS
801                   '@loader_path/../../../../../..',
802                 ],
803               },
804             }],
805           ],
806         },  # target content_shell_helper_app
807       ],
808     }],  # OS=="mac"
809     ['OS=="android"', {
810       'targets': [
811         {
812           # TODO(jrg): Update this action and other jni generators to only
813           # require specifying the java directory and generate the rest.
814           'target_name': 'content_shell_jni_headers',
815           'type': 'none',
816           'sources': [
817             'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java',
818             'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java',
819             'shell/android/java/src/org/chromium/content_shell/ShellManager.java',
820             'shell/android/java/src/org/chromium/content_shell/Shell.java',
821           ],
822           'variables': {
823             'jni_gen_package': 'content/shell',
824           },
825           'includes': [ '../build/jni_generator.gypi' ],
826         },
827         {
828           'target_name': 'libcontent_shell_content_view',
829           'type': 'shared_library',
830           'dependencies': [
831             'content_shell_jni_headers',
832             'content_shell_lib',
833             'content_shell_pak',
834             # Skia is necessary to ensure the dependencies needed by
835             # WebContents are included.
836             '../skia/skia.gyp:skia',
837             '<(DEPTH)/media/media.gyp:player_android',
838           ],
839           'sources': [
840             'shell/android/shell_library_loader.cc',
841             'shell/android/shell_library_loader.h',
842           ],
843           'conditions': [
844             ['android_webview_build==1', {
845               'ldflags': [
846                 '-lgabi++',  # For rtti
847               ],
848             }],
849           ],
850         },
851         {
852           'target_name': 'content_shell_java',
853           'type': 'none',
854           'dependencies': [
855             'content.gyp:content_java',
856           ],
857           'variables': {
858             'java_in_dir': '../content/shell/android/java',
859             'has_java_resources': 1,
860             'R_package': 'org.chromium.content_shell',
861             'R_package_relpath': 'org/chromium/content_shell',
862           },
863           'includes': [ '../build/java.gypi' ],
864         },
865         {
866           # content_shell_apk creates a .jar as a side effect. Any java targets
867           # that need that .jar in their classpath should depend on this target,
868           # content_shell_apk_java. Dependents of content_shell_apk receive its
869           # jar path in the variable 'apk_output_jar_path'. This target should
870           # only be used by targets which instrument content_shell_apk.
871           'target_name': 'content_shell_apk_java',
872           'type': 'none',
873           'dependencies': [
874             'content_shell_apk',
875           ],
876           'includes': [ '../build/apk_fake_jar.gypi' ],
877         },
878         {
879           'target_name': 'content_shell_apk',
880           'type': 'none',
881           'dependencies': [
882             'content.gyp:content_java',
883             'content_java_test_support',
884             'content_shell_java',
885             'libcontent_shell_content_view',
886             '../base/base.gyp:base_java',
887             '../media/media.gyp:media_java',
888             '../net/net.gyp:net_java',
889             '../tools/android/forwarder/forwarder.gyp:forwarder',
890             '../ui/android/ui_android.gyp:ui_java',
891           ],
892           'variables': {
893             'apk_name': 'ContentShell',
894             'manifest_package_name': 'org.chromium.content_shell_apk',
895             'java_in_dir': 'shell/android/shell_apk',
896             'resource_dir': 'shell/android/shell_apk/res',
897             'native_lib_target': 'libcontent_shell_content_view',
898             'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
899             'asset_location': '<(PRODUCT_DIR)/content_shell/assets',
900           },
901           'conditions': [
902             ['android_webview_build==0', {
903               'dependencies': [
904                 '../tools/imagediff/image_diff.gyp:image_diff#host',
905               ],
906             }],
907           ],
908           'includes': [ '../build/java_apk.gypi' ],
909         },
910       ],
911     }],  # OS=="android"
912     ['OS=="win"', {
913       'targets': [
914         {
915           'target_name': 'content_shell_crash_service',
916           'type': 'executable',
917           'dependencies': [
918             '../base/base.gyp:base',
919             '../components/components.gyp:breakpad_crash_service',
920           ],
921           'include_dirs': [
922             '..',
923           ],
924           'sources': [
925             'shell/tools/content_shell_crash_service.cc',
926           ],
927           'msvs_settings': {
928             'VCLinkerTool': {
929               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
930             },
931           },
932         },
933       ],
934     }],  # OS=="win"
935     ['OS=="win" and fastbuild==0 and target_arch=="ia32"', {
936       'variables': {
937         'dest_dir': '<(PRODUCT_DIR)/syzygy',
938       },
939       'targets': [
940         {
941           'target_name': 'content_shell_syzyasan',
942           'type': 'none',
943           'sources' : [],
944           # Instrument content_shell with SyzyAsan.
945           'actions': [
946             {
947               'action_name': 'Instrument content_shell with SyzyAsan',
948               'msvs_cygwin_shell': 0,
949               'inputs': [
950                 '<(PRODUCT_DIR)/content_shell.exe',
951               ],
952               'outputs': [
953                 '<(dest_dir)/content_shell.exe',
954                 '<(dest_dir)/content_shell.exe.pdb',
955               ],
956               'action': [
957                 'python',
958                 '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py',
959                 '--mode', 'asan',
960                 '--input_executable', '<(PRODUCT_DIR)/content_shell.exe',
961                 '--input_symbol', '<(PRODUCT_DIR)/content_shell.exe.pdb',
962                 '--destination_dir', '<(dest_dir)',
963               ],
964             },
965           ],
966         },
967       ],
968     }],  # OS=="win" and fastbuild==0 and target_arch=="ia32"
969   ]