| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//mojo/public/mojo.gni") | 6 import("//mojo/public/mojo.gni") |
| 7 import("//mojo/public/mojo_application.gni") | 7 import("//mojo/public/mojo_application.gni") |
| 8 import("//mojo/public/tools/bindings/mojom.gni") | 8 import("//mojo/public/tools/bindings/mojom.gni") |
| 9 import("//mojo/tools/embed/rules.gni") | 9 import("//mojo/tools/embed/rules.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ] | 39 ] |
| 40 } | 40 } |
| 41 | 41 |
| 42 if (is_android) { | 42 if (is_android) { |
| 43 import("//build/config/android/config.gni") | 43 import("//build/config/android/config.gni") |
| 44 import("//build/config/android/rules.gni") | 44 import("//build/config/android/rules.gni") |
| 45 } | 45 } |
| 46 | 46 |
| 47 if (!mojo_use_prebuilt_mojo_shell) { | 47 if (!mojo_use_prebuilt_mojo_shell) { |
| 48 executable("mojo_shell") { | 48 executable("mojo_shell") { |
| 49 sources = [ | 49 sources = [] |
| 50 "desktop/main.cc", | |
| 51 ] | |
| 52 | 50 |
| 53 deps = [ | 51 deps = [ |
| 54 ":init", | 52 ":init", |
| 55 ":lib", | 53 ":lib", |
| 56 "//base", | 54 "//base", |
| 57 "//base/allocator", | 55 "//base/allocator", |
| 58 "//build/config/sanitizers:deps", | 56 "//build/config/sanitizers:deps", |
| 59 "//mojo/common", | 57 "//mojo/common", |
| 60 "//mojo/environment:chromium", | 58 "//mojo/environment:chromium", |
| 61 ] | 59 ] |
| 62 | 60 |
| 63 if (is_android) { | 61 data_deps = [ ":mojo_shell_child" ] |
| 62 |
| 63 if (!is_android) { |
| 64 sources += [ "desktop/main.cc" ] |
| 65 } else { |
| 64 sources += [ | 66 sources += [ |
| 65 "android/library_loader.cc", | 67 "android/library_loader.cc", |
| 66 "android/main.cc", | 68 "android/main.cc", |
| 67 "android/main.h", | 69 "android/main.h", |
| 68 ] | 70 ] |
| 69 | 71 |
| 70 # On android, the executable is also the native library used by the apk. | 72 # On android, the executable is also the native library used by the apk. |
| 71 # It means dynamic symbols must be preserved and exported. | 73 # It means dynamic symbols must be preserved and exported. |
| 72 ldflags = [ "-Wl,--export-dynamic" ] | 74 ldflags = [ "-Wl,--export-dynamic" ] |
| 73 | 75 |
| 74 deps += [ | 76 deps += [ |
| 75 ":jni_headers", | 77 ":jni_headers", |
| 76 "//services/native_viewport:lib", | 78 "//services/native_viewport:lib", |
| 77 "//shell/application_manager", | 79 "//shell/application_manager", |
| 78 "//ui/gl", | 80 "//ui/gl", |
| 79 ] | 81 ] |
| 80 } | 82 } |
| 81 } | 83 } |
| 84 |
| 85 executable("mojo_shell_child") { |
| 86 sources = [ |
| 87 "child_main.cc", |
| 88 ] |
| 89 |
| 90 deps = [ |
| 91 # TODO(vtl): Reduce these dependencies (probably mostly in :lib). |
| 92 ":child_controller_bindings", |
| 93 ":init", |
| 94 ":lib", |
| 95 ":native_application_support", |
| 96 "//base", |
| 97 "//base/allocator", |
| 98 "//build/config/sanitizers:deps", |
| 99 "//mojo/common", |
| 100 "//mojo/edk/system", |
| 101 "//mojo/environment:chromium", |
| 102 ] |
| 103 } |
| 82 } # !mojo_use_prebuilt_mojo_shell | 104 } # !mojo_use_prebuilt_mojo_shell |
| 83 | 105 |
| 84 executable("mojo_launcher") { | 106 executable("mojo_launcher") { |
| 85 sources = [ | 107 sources = [ |
| 86 "launcher_main.cc", | 108 "launcher_main.cc", |
| 87 ] | 109 ] |
| 88 | 110 |
| 89 deps = [ | 111 deps = [ |
| 90 ":external_application_registrar_bindings", | 112 ":external_application_registrar_bindings", |
| 91 ":external_application_registrar_connection", | 113 ":external_application_registrar_connection", |
| (...skipping 30 matching lines...) Expand all Loading... |
| 122 "//shell/application_manager", | 144 "//shell/application_manager", |
| 123 ] | 145 ] |
| 124 | 146 |
| 125 deps = [ | 147 deps = [ |
| 126 "//base", | 148 "//base", |
| 127 ] | 149 ] |
| 128 } | 150 } |
| 129 | 151 |
| 130 source_set("lib") { | 152 source_set("lib") { |
| 131 sources = [ | 153 sources = [ |
| 132 "child_main.cc", | |
| 133 "child_main.h", | |
| 134 "child_process_host.cc", | 154 "child_process_host.cc", |
| 135 "child_process_host.h", | 155 "child_process_host.h", |
| 136 "command_line_util.cc", | 156 "command_line_util.cc", |
| 137 "command_line_util.h", | 157 "command_line_util.h", |
| 138 "context.cc", | 158 "context.cc", |
| 139 "context.h", | 159 "context.h", |
| 140 "external_application_listener.cc", | 160 "external_application_listener.cc", |
| 141 "external_application_listener.h", | 161 "external_application_listener.h", |
| 142 "filename_util.cc", | 162 "filename_util.cc", |
| 143 "filename_util.h", | 163 "filename_util.h", |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 custom_package = "org.chromium.mojo.shell" | 332 custom_package = "org.chromium.mojo.shell" |
| 313 } | 333 } |
| 314 | 334 |
| 315 mojo_shell_assets_dir = "$root_build_dir/mojo_shell_assets" | 335 mojo_shell_assets_dir = "$root_build_dir/mojo_shell_assets" |
| 316 mojo_shell_test_assets_dir = "$root_build_dir/mojo_shell_test_assets" | 336 mojo_shell_test_assets_dir = "$root_build_dir/mojo_shell_test_assets" |
| 317 | 337 |
| 318 copy_ex("copy_mojo_shell_assets") { | 338 copy_ex("copy_mojo_shell_assets") { |
| 319 clear_dir = true | 339 clear_dir = true |
| 320 dest = mojo_shell_assets_dir | 340 dest = mojo_shell_assets_dir |
| 321 sources = [ | 341 sources = [ |
| 342 "$root_out_dir/exe.stripped/mojo_shell_child", |
| 322 "$root_out_dir/lib.stripped/libbootstrap.so", | 343 "$root_out_dir/lib.stripped/libbootstrap.so", |
| 323 "$root_out_dir/network_service.mojo", | 344 "$root_out_dir/network_service.mojo", |
| 324 "$root_out_dir/obj/shell/bootstrap_java.dex.jar", | 345 "$root_out_dir/obj/shell/bootstrap_java.dex.jar", |
| 325 ] | 346 ] |
| 326 } | 347 } |
| 327 | 348 |
| 328 copy("copy_mojo_shell") { | 349 copy("copy_mojo_shell") { |
| 329 sources = [ | 350 sources = [ |
| 330 "$root_out_dir/exe.stripped/mojo_shell", | 351 "$root_out_dir/exe.stripped/mojo_shell", |
| 331 ] | 352 ] |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 "//base", | 426 "//base", |
| 406 "//mojo/common", | 427 "//mojo/common", |
| 407 "//mojo/edk/system", | 428 "//mojo/edk/system", |
| 408 "//mojo/public/cpp/bindings", | 429 "//mojo/public/cpp/bindings", |
| 409 "//mojo/public/interfaces/application", | 430 "//mojo/public/interfaces/application", |
| 410 "//shell/domain_socket", | 431 "//shell/domain_socket", |
| 411 "//url", | 432 "//url", |
| 412 ] | 433 ] |
| 413 } | 434 } |
| 414 | 435 |
| 415 # GYP version: mojo/mojo.gyp:mojo_shell_tests | |
| 416 test("mojo_shell_tests") { | 436 test("mojo_shell_tests") { |
| 417 sources = [ | 437 sources = [ |
| 418 "child_process_host_unittest.cc", | 438 "child_process_host_unittest.cc", |
| 419 "command_line_util_unittest.cc", | 439 "command_line_util_unittest.cc", |
| 420 "context_unittest.cc", | 440 "context_unittest.cc", |
| 421 "data_pipe_peek_unittest.cc", | 441 "data_pipe_peek_unittest.cc", |
| 422 "in_process_native_runner_unittest.cc", | 442 "in_process_native_runner_unittest.cc", |
| 423 "native_runner_unittest.cc", | 443 "native_runner_unittest.cc", |
| 424 "shell_test_base.cc", | 444 "shell_test_base.cc", |
| 425 "shell_test_base.h", | 445 "shell_test_base.h", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 438 "//testing/gtest", | 458 "//testing/gtest", |
| 439 "//url", | 459 "//url", |
| 440 "//mojo/common", | 460 "//mojo/common", |
| 441 "//mojo/edk/system", | 461 "//mojo/edk/system", |
| 442 "//mojo/environment:chromium", | 462 "//mojo/environment:chromium", |
| 443 "//mojo/public/cpp/bindings", | 463 "//mojo/public/cpp/bindings", |
| 444 "//services/test_service:bindings", | 464 "//services/test_service:bindings", |
| 445 "//shell/application_manager", | 465 "//shell/application_manager", |
| 446 ] | 466 ] |
| 447 | 467 |
| 448 datadeps = [ | 468 data_deps = [ |
| 469 ":mojo_shell_child", |
| 449 "//services/test_service:test_app", | 470 "//services/test_service:test_app", |
| 450 "//services/test_service:test_request_tracker_app", | 471 "//services/test_service:test_request_tracker_app", |
| 451 ] | 472 ] |
| 452 | 473 |
| 453 if (is_android) { | 474 if (is_android) { |
| 454 sources += [ "android/background_application_loader_unittest.cc" ] | 475 sources += [ "android/background_application_loader_unittest.cc" ] |
| 455 | 476 |
| 456 deps += [ ":jni_headers" ] | 477 deps += [ ":jni_headers" ] |
| 457 | 478 |
| 458 apk_deps = [ | 479 apk_deps = [ |
| 459 ":copy_mojo_shell_test_assets", | 480 ":copy_mojo_shell_test_assets", |
| 460 ":mojo_shell_tests_java", | 481 ":mojo_shell_tests_java", |
| 461 ] | 482 ] |
| 462 | 483 |
| 463 apk_asset_location = mojo_shell_test_assets_dir | 484 apk_asset_location = mojo_shell_test_assets_dir |
| 464 } | 485 } |
| 465 } | 486 } |
| 466 | 487 |
| 467 # GYP version: mojo/mojo.gyp:mojo_shell_test_support | |
| 468 source_set("test_support") { | 488 source_set("test_support") { |
| 469 sources = [ | 489 sources = [ |
| 470 "shell_test_helper.cc", | 490 "shell_test_helper.cc", |
| 471 "shell_test_helper.h", | 491 "shell_test_helper.h", |
| 472 ] | 492 ] |
| 473 | 493 |
| 474 deps = [ | 494 deps = [ |
| 475 ":init", | 495 ":init", |
| 476 ":lib", | 496 ":lib", |
| 477 "//base", | 497 "//base", |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 "//mojo/public/cpp/system:system", | 556 "//mojo/public/cpp/system:system", |
| 537 "//mojo/services/http_server/public/cpp", | 557 "//mojo/services/http_server/public/cpp", |
| 538 "//mojo/services/http_server/public/interfaces", | 558 "//mojo/services/http_server/public/interfaces", |
| 539 "//mojo/services/network/public/interfaces", | 559 "//mojo/services/network/public/interfaces", |
| 540 "//shell/test:bindings", | 560 "//shell/test:bindings", |
| 541 ":embed_pingable", | 561 ":embed_pingable", |
| 542 ] | 562 ] |
| 543 | 563 |
| 544 data_deps = [ "//services/http_server:http_server($default_toolchain)" ] | 564 data_deps = [ "//services/http_server:http_server($default_toolchain)" ] |
| 545 } | 565 } |
| OLD | NEW |