| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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("//services/service_manager/public/cpp/service.gni") | 5 import("//services/service_manager/public/cpp/service.gni") |
| 6 import("//services/service_manager/public/service_manifest.gni") |
| 6 import("//mojo/public/tools/bindings/mojom.gni") | 7 import("//mojo/public/tools/bindings/mojom.gni") |
| 7 import("//testing/test.gni") | 8 import("//testing/test.gni") |
| 8 | 9 |
| 9 group("host") { | 10 group("host") { |
| 10 testonly = true | 11 testonly = true |
| 11 | 12 |
| 12 deps = [ | 13 deps = [ |
| 13 ":lib", | 14 ":lib", |
| 14 ":mojo_runner_host_unittests", | 15 ":mojo_runner_host_unittests", |
| 15 ] | 16 ] |
| 16 } | 17 } |
| 17 | 18 |
| 18 source_set("native_library_runner") { | |
| 19 sources = [ | |
| 20 "native_library_runner.cc", | |
| 21 "native_library_runner.h", | |
| 22 ] | |
| 23 | |
| 24 deps = [ | |
| 25 "//base", | |
| 26 "//mojo/edk/system", | |
| 27 "//services/service_manager", | |
| 28 ] | |
| 29 | |
| 30 # This target has to include the public thunk headers, which generally | |
| 31 # shouldn't be included without picking an implementation. We are providing | |
| 32 # the implementation but the thunk header target cannot declare that we are | |
| 33 # permitted to include it since it's in the public SDK and we are not. | |
| 34 # Suppress include checking so we can still check the rest of the targets in | |
| 35 # this file. | |
| 36 check_includes = false | |
| 37 } | |
| 38 | |
| 39 source_set("child_process_base") { | |
| 40 sources = [ | |
| 41 "child_process_base.cc", | |
| 42 "child_process_base.h", | |
| 43 ] | |
| 44 | |
| 45 deps = [ | |
| 46 "//base", | |
| 47 "//mojo/edk/system", | |
| 48 "//services/service_manager", | |
| 49 "//services/service_manager/public/interfaces", | |
| 50 "//services/service_manager/runner:init", | |
| 51 "//services/service_manager/runner/common", | |
| 52 ] | |
| 53 | |
| 54 if (is_linux && !is_android) { | |
| 55 sources += [ | |
| 56 "linux_sandbox.cc", | |
| 57 "linux_sandbox.h", | |
| 58 ] | |
| 59 | |
| 60 deps += [ | |
| 61 "//sandbox/linux:sandbox", | |
| 62 "//sandbox/linux:sandbox_services", | |
| 63 "//sandbox/linux:seccomp_bpf", | |
| 64 ] | |
| 65 } | |
| 66 | |
| 67 if (is_mac) { | |
| 68 sources += [ | |
| 69 "mach_broker.cc", | |
| 70 "mach_broker.h", | |
| 71 ] | |
| 72 } | |
| 73 } | |
| 74 | |
| 75 source_set("lib") { | 19 source_set("lib") { |
| 76 sources = [ | 20 sources = [ |
| 77 "child_process.cc", | |
| 78 "child_process.h", | |
| 79 "child_process_host.cc", | 21 "child_process_host.cc", |
| 80 "child_process_host.h", | 22 "child_process_host.h", |
| 81 "in_process_native_runner.cc", | |
| 82 "in_process_native_runner.h", | |
| 83 "out_of_process_native_runner.cc", | 23 "out_of_process_native_runner.cc", |
| 84 "out_of_process_native_runner.h", | 24 "out_of_process_native_runner.h", |
| 85 ] | 25 ] |
| 86 | 26 |
| 87 deps = [ | 27 deps = [ |
| 88 ":child_process_base", | |
| 89 ":native_library_runner", | |
| 90 "//base:base_static", | 28 "//base:base_static", |
| 91 "//base:i18n", | 29 "//base:i18n", |
| 92 "//services/service_manager/public/cpp:sources", | 30 "//services/service_manager/public/cpp:sources", |
| 31 "//services/service_manager/public/cpp/standalone_service", |
| 93 "//services/service_manager/runner:init", | 32 "//services/service_manager/runner:init", |
| 94 "//services/service_manager/runner/common", | 33 "//services/service_manager/runner/common", |
| 95 ] | 34 ] |
| 96 | 35 |
| 97 public_deps = [ | 36 public_deps = [ |
| 98 "//base", | 37 "//base", |
| 99 "//mojo/edk/system", | 38 "//mojo/edk/system", |
| 100 "//mojo/public/cpp/system", | 39 "//mojo/public/cpp/system", |
| 101 "//services/service_manager", | 40 "//services/service_manager", |
| 102 "//services/service_manager/public/interfaces", | 41 "//services/service_manager/public/interfaces", |
| 103 ] | 42 ] |
| 104 | 43 |
| 105 if (is_linux && !is_android) { | 44 if (is_linux && !is_android) { |
| 106 deps += [ "//sandbox/linux:sandbox_services" ] | 45 deps += [ "//sandbox/linux:sandbox_services" ] |
| 107 } | 46 } |
| 108 } | 47 } |
| 109 | 48 |
| 110 test("mojo_runner_host_unittests") { | 49 test("mojo_runner_host_unittests") { |
| 111 sources = [ | 50 sources = [ |
| 112 "child_process_host_unittest.cc", | 51 "child_process_host_unittest.cc", |
| 113 "host_unittests.cc", | 52 "host_unittests.cc", |
| 114 "in_process_native_runner_unittest.cc", | |
| 115 ] | 53 ] |
| 116 | 54 |
| 117 deps = [ | 55 deps = [ |
| 118 ":lib", | 56 ":lib", |
| 119 "//base", | 57 "//base", |
| 120 "//base/test:test_support", | 58 "//base/test:test_support", |
| 121 "//mojo/edk/system", | 59 "//mojo/edk/system", |
| 122 "//services/service_manager", | 60 "//services/service_manager", |
| 123 "//services/service_manager/runner:init", | 61 "//services/service_manager/runner:init", |
| 124 "//services/service_manager/runner/common", | 62 "//services/service_manager/runner/common", |
| 125 "//testing/gtest", | 63 "//testing/gtest", |
| 126 ] | 64 ] |
| 65 |
| 66 data_deps = [ |
| 67 ":host_test_service", |
| 68 ] |
| 127 } | 69 } |
| 70 |
| 71 service("host_test_service") { |
| 72 sources = [ |
| 73 "host_test_service_main.cc", |
| 74 ] |
| 75 |
| 76 deps = [ |
| 77 "//mojo/public/cpp/system", |
| 78 "//services/service_manager/public/cpp/standalone_service:main", |
| 79 ] |
| 80 |
| 81 data_deps = [ |
| 82 ":host_test_service_manifest", |
| 83 ] |
| 84 } |
| 85 |
| 86 service_manifest("host_test_service_manifest") { |
| 87 name = "host_test_service" |
| 88 source = "host_test_service_manifest.json" |
| 89 } |
| OLD | NEW |