OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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 # There should be only one memory instrumentaiton coordinator. It is currently | 5 # There should be only one resource coordinator. It is currently |
6 # in the browser process. So, only //content/browser should link to this target. | 6 # in the browser process. So, only //content/browser should link to this target. |
7 # Others modules should only need the public targets. | 7 # Others modules should only need the public targets. |
| 8 import("//services/catalog/public/tools/catalog.gni") |
| 9 import("//services/service_manager/public/cpp/service.gni") |
| 10 import("//services/service_manager/public/service_manifest.gni") |
| 11 import("//services/service_manager/public/tools/test/service_test.gni") |
| 12 |
8 source_set("lib") { | 13 source_set("lib") { |
9 sources = [ | 14 sources = [ |
| 15 "coordination_unit/coordination_unit_impl.cc", |
| 16 "coordination_unit/coordination_unit_impl.h", |
| 17 "coordination_unit/coordination_unit_provider_impl.cc", |
| 18 "coordination_unit/coordination_unit_provider_impl.h", |
10 "memory/coordinator/coordinator_impl.cc", | 19 "memory/coordinator/coordinator_impl.cc", |
11 "memory/coordinator/coordinator_impl.h", | 20 "memory/coordinator/coordinator_impl.h", |
| 21 "resource_coordinator_service.cc", |
| 22 "resource_coordinator_service.h", |
12 ] | 23 ] |
13 | 24 |
14 public_deps = [ | 25 public_deps = [ |
15 "//base", | 26 "//base", |
16 "//mojo/public/cpp/bindings", | 27 "//mojo/public/cpp/bindings", |
17 "//services/resource_coordinator/public/cpp", | 28 "//services/resource_coordinator/public/cpp", |
18 "//services/resource_coordinator/public/interfaces", | 29 "//services/resource_coordinator/public/interfaces", |
19 ] | 30 ] |
| 31 |
| 32 data_deps = [ |
| 33 ":manifest", |
| 34 ] |
| 35 } |
| 36 |
| 37 service_manifest("manifest") { |
| 38 name = "resource_coordinator" |
| 39 source = "manifest.json" |
| 40 } |
| 41 |
| 42 service("resource_coordinator") { |
| 43 sources = [ |
| 44 "service_main.cc", |
| 45 ] |
| 46 |
| 47 deps = [ |
| 48 ":lib", |
| 49 "//mojo/public/cpp/system", |
| 50 ] |
20 } | 51 } |
21 | 52 |
22 source_set("tests") { | 53 source_set("tests") { |
23 testonly = true | 54 testonly = true |
24 | 55 |
25 sources = [ | 56 sources = [ |
| 57 "coordination_unit/coordination_unit_impl_unittest.cc", |
26 "memory/coordinator/coordinator_impl_unittest.cc", | 58 "memory/coordinator/coordinator_impl_unittest.cc", |
27 "public/cpp/memory/memory_dump_manager_delegate_impl_unittest.cc", | 59 "public/cpp/memory/memory_dump_manager_delegate_impl_unittest.cc", |
28 ] | 60 ] |
29 | 61 |
30 deps = [ | 62 deps = [ |
31 ":lib", | 63 ":lib", |
32 "//base", | 64 "//base", |
33 "//mojo/public/cpp/bindings", | 65 "//mojo/public/cpp/bindings", |
34 "//services/resource_coordinator/public/cpp", | 66 "//services/resource_coordinator/public/cpp", |
35 "//services/resource_coordinator/public/interfaces", | 67 "//services/resource_coordinator/public/interfaces", |
36 "//testing/gtest", | 68 "//testing/gtest", |
37 ] | 69 ] |
38 } | 70 } |
| 71 |
| 72 service_test("resource_coordinator_unittests") { |
| 73 sources = [ |
| 74 "resource_coordinator_service_unittest.cc", |
| 75 ] |
| 76 |
| 77 catalog = ":resource_coordinator_unittests_catalog" |
| 78 |
| 79 deps = [ |
| 80 "//base", |
| 81 "//mojo/public/cpp/bindings", |
| 82 "//services/resource_coordinator/public/cpp", |
| 83 "//services/resource_coordinator/public/interfaces", |
| 84 "//services/service_manager/public/cpp", |
| 85 "//services/service_manager/public/cpp:service_test_support", |
| 86 "//services/service_manager/public/interfaces", |
| 87 "//testing/gtest", |
| 88 ] |
| 89 } |
| 90 |
| 91 service_manifest("unittest_manifest") { |
| 92 name = "resource_coordinator_unittests" |
| 93 source = "unittest_manifest.json" |
| 94 } |
| 95 |
| 96 catalog("resource_coordinator_unittests_catalog") { |
| 97 embedded_services = [ ":unittest_manifest" ] |
| 98 standalone_services = [ ":manifest" ] |
| 99 } |
OLD | NEW |