OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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/features.gni") | 5 import("//build/config/features.gni") |
6 import("//services/catalog/public/tools/catalog.gni") | 6 import("//services/catalog/public/tools/catalog.gni") |
7 import("//services/service_manager/public/cpp/service.gni") | 7 import("//services/service_manager/public/cpp/service.gni") |
8 import("//services/service_manager/public/service_manifest.gni") | 8 import("//services/service_manager/public/service_manifest.gni") |
9 | 9 |
10 if (is_android) { | 10 if (is_android) { |
11 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
12 } | 12 } |
13 | 13 |
14 source_set("lib") { | 14 source_set("lib") { |
15 # This should be visible only to embedders of the Device Service, and the | 15 # This should be visible only to embedders of the Device Service, and the |
16 # dependence should only be for the purpose of embedding the Device Service. | 16 # dependence should only be for the purpose of embedding the Device Service. |
17 visibility = [ | 17 visibility = [ |
18 ":test_support", | 18 ":test_support", |
19 "//content/browser", | 19 "//content/browser", |
20 ] | 20 ] |
21 sources = [ | 21 sources = [ |
22 "device_service.cc", | 22 "device_service.cc", |
23 "device_service.h", | 23 "device_service.h", |
24 ] | 24 ] |
25 | 25 |
26 deps = [ | 26 deps = [ |
27 "//base", | 27 "//base", |
28 "//device/generic_sensor", | |
29 "//device/nfc:mojo_bindings", | 28 "//device/nfc:mojo_bindings", |
30 "//device/sensors", | 29 "//device/sensors", |
31 "//device/sensors/public/interfaces", | 30 "//device/sensors/public/interfaces", |
32 "//device/wake_lock", | 31 "//device/wake_lock", |
33 "//services/device/fingerprint", | 32 "//services/device/fingerprint", |
| 33 "//services/device/generic_sensor", |
34 "//services/device/power_monitor", | 34 "//services/device/power_monitor", |
35 "//services/device/public/cpp:device_features", | 35 "//services/device/public/cpp:device_features", |
36 "//services/device/public/interfaces", | 36 "//services/device/public/interfaces", |
37 "//services/device/screen_orientation", | 37 "//services/device/screen_orientation", |
38 "//services/device/time_zone_monitor", | 38 "//services/device/time_zone_monitor", |
39 "//services/service_manager/public/cpp", | 39 "//services/service_manager/public/cpp", |
40 "//ui/gfx", | 40 "//ui/gfx", |
41 ] | 41 ] |
42 | 42 |
43 if (is_android) { | 43 if (is_android) { |
44 sources += [ | 44 sources += [ |
45 "//services/device/android/register_jni.cc", | 45 "//services/device/android/register_jni.cc", |
46 "//services/device/android/register_jni.h", | 46 "//services/device/android/register_jni.h", |
47 ] | 47 ] |
48 deps += [ ":device_service_jni_headers" ] | 48 deps += [ ":device_service_jni_headers" ] |
49 } else { | 49 } else { |
50 deps += [ | 50 deps += [ |
51 "//services/device/battery", | 51 "//services/device/battery", |
52 "//services/device/vibration", | 52 "//services/device/vibration", |
53 ] | 53 ] |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
| 57 is_linux_without_udev = is_linux && !use_udev |
| 58 |
57 source_set("tests") { | 59 source_set("tests") { |
58 testonly = true | 60 testonly = true |
59 | 61 |
60 sources = [ | 62 sources = [ |
61 "battery/battery_status_manager_win_unittest.cc", | 63 "battery/battery_status_manager_win_unittest.cc", |
62 "battery/battery_status_service_unittest.cc", | 64 "battery/battery_status_service_unittest.cc", |
| 65 "generic_sensor/platform_sensor_and_provider_unittest_win.cc", |
| 66 "generic_sensor/platform_sensor_provider_unittest.cc", |
63 "power_monitor/power_monitor_message_broadcaster_unittest.cc", | 67 "power_monitor/power_monitor_message_broadcaster_unittest.cc", |
64 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc", | 68 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc", |
65 "vibration/vibration_manager_impl_unittest.cc", | 69 "vibration/vibration_manager_impl_unittest.cc", |
66 ] | 70 ] |
67 | 71 |
68 deps = [ | 72 deps = [ |
69 ":test_support", | 73 ":test_support", |
70 "//base", | 74 "//base", |
71 "//base/test:test_support", | 75 "//base/test:test_support", |
72 "//mojo/public/cpp/bindings", | 76 "//mojo/public/cpp/bindings", |
| 77 "//services/device/generic_sensor", |
| 78 "//services/device/generic_sensor:testing", |
73 "//services/device/power_monitor", | 79 "//services/device/power_monitor", |
74 "//services/device/public/cpp/power_monitor", | 80 "//services/device/public/cpp/power_monitor", |
75 "//testing/gmock", | 81 "//testing/gmock", |
76 "//testing/gtest", | 82 "//testing/gtest", |
77 ] | 83 ] |
78 | 84 |
| 85 if (!is_linux_without_udev) { |
| 86 sources += |
| 87 [ "generic_sensor/platform_sensor_and_provider_unittest_linux.cc" ] |
| 88 } |
| 89 |
79 if (is_linux && !is_chromeos && use_dbus) { | 90 if (is_linux && !is_chromeos && use_dbus) { |
80 sources += [ "battery/battery_status_manager_linux_unittest.cc" ] | 91 sources += [ "battery/battery_status_manager_linux_unittest.cc" ] |
81 deps += [ "//dbus:test_support" ] | 92 deps += [ "//dbus:test_support" ] |
82 } | 93 } |
83 | 94 |
84 if (is_chromeos) { | 95 if (is_chromeos) { |
85 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ] | 96 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ] |
86 deps += [ | 97 deps += [ |
87 "//chromeos", | 98 "//chromeos", |
88 "//dbus", | 99 "//dbus", |
89 "//services/device/fingerprint", | 100 "//services/device/fingerprint", |
90 "//third_party/protobuf:protobuf_lite", | 101 "//third_party/protobuf:protobuf_lite", |
91 ] | 102 ] |
92 } | 103 } |
93 | 104 |
94 if (is_android) { | 105 if (is_android) { |
95 sources -= [ "battery/battery_status_service_unittest.cc" ] | 106 sources -= [ "battery/battery_status_service_unittest.cc" ] |
96 deps += [ | 107 deps += [ |
97 ":device_service_jni_headers", | 108 ":device_service_jni_headers", |
98 "//services/device/vibration/android:vibration_jni_headers", | 109 "//services/device/vibration/android:vibration_jni_headers", |
99 ] | 110 ] |
100 } else { | 111 } else { |
101 sources += [ "battery/battery_monitor_impl_unittest.cc" ] | 112 sources += [ "battery/battery_monitor_impl_unittest.cc" ] |
102 deps += [ | 113 deps += [ |
103 "//services/device/battery", | 114 "//services/device/battery", |
104 "//services/device/vibration", | 115 "//services/device/vibration", |
105 ] | 116 ] |
106 } | 117 } |
| 118 |
| 119 if (is_win) { |
| 120 # Needed for "generic_sensor/platform_sensor_and_provider_unittest_win.cc" |
| 121 libs = [ |
| 122 "propsys.lib", |
| 123 "sensorsapi.lib", |
| 124 ] |
| 125 } |
107 } | 126 } |
108 | 127 |
109 service_manifest("manifest") { | 128 service_manifest("manifest") { |
110 name = "device" | 129 name = "device" |
111 source = "manifest.json" | 130 source = "manifest.json" |
112 } | 131 } |
113 | 132 |
114 service_manifest("unittest_manifest") { | 133 service_manifest("unittest_manifest") { |
115 name = "device_unittests" | 134 name = "device_unittests" |
116 source = "unittest_manifest.json" | 135 source = "unittest_manifest.json" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis
trar.java" ] | 183 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis
trar.java" ] |
165 deps = [ | 184 deps = [ |
166 "//base:base_java", | 185 "//base:base_java", |
167 "//device/nfc:mojo_bindings_java", | 186 "//device/nfc:mojo_bindings_java", |
168 "//device/nfc/android:java", | 187 "//device/nfc/android:java", |
169 "//device/nfc/public/java:nfc_java", | 188 "//device/nfc/public/java:nfc_java", |
170 "//mojo/android:system_java", | 189 "//mojo/android:system_java", |
171 "//mojo/public/java:bindings_java", | 190 "//mojo/public/java:bindings_java", |
172 "//mojo/public/java:system_java", | 191 "//mojo/public/java:system_java", |
173 "//services/device/battery/android:battery_monitor_java", | 192 "//services/device/battery/android:battery_monitor_java", |
| 193 "//services/device/generic_sensor:java", |
174 "//services/device/public/interfaces:interfaces_java", | 194 "//services/device/public/interfaces:interfaces_java", |
175 "//services/device/screen_orientation:java", | 195 "//services/device/screen_orientation:java", |
176 "//services/device/time_zone_monitor:java", | 196 "//services/device/time_zone_monitor:java", |
177 "//services/device/vibration/android:vibration_manager_java", | 197 "//services/device/vibration/android:vibration_manager_java", |
178 "//services/service_manager/public/interfaces:interfaces_java", | 198 "//services/service_manager/public/interfaces:interfaces_java", |
179 "//services/service_manager/public/java:service_manager_java", | 199 "//services/service_manager/public/java:service_manager_java", |
180 ] | 200 ] |
181 } | 201 } |
182 } | 202 } |
OLD | NEW |