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