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