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