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