| 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") | |
| 7 import("//services/service_manager/public/cpp/service.gni") | 6 import("//services/service_manager/public/cpp/service.gni") |
| 8 import("//services/service_manager/public/service_manifest.gni") | 7 import("//services/service_manager/public/service_manifest.gni") |
| 9 | 8 |
| 10 if (is_android) { | 9 if (is_android) { |
| 11 import("//build/config/android/rules.gni") | 10 import("//build/config/android/rules.gni") |
| 12 } | 11 } |
| 13 | 12 |
| 14 source_set("lib") { | 13 source_set("lib") { |
| 15 # This should be visible only to embedders of the Device Service, and the | 14 # 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. | 15 # dependence should only be for the purpose of embedding the Device Service. |
| 17 visibility = [ | 16 visibility = [ "//content/browser" ] |
| 18 ":test_support", | |
| 19 "//content/browser", | |
| 20 ] | |
| 21 sources = [ | 17 sources = [ |
| 22 "device_service.cc", | 18 "device_service.cc", |
| 23 "device_service.h", | 19 "device_service.h", |
| 24 ] | 20 ] |
| 25 | 21 |
| 26 deps = [ | 22 deps = [ |
| 27 "//base", | 23 "//base", |
| 28 "//device/battery:mojo_bindings", | 24 "//device/battery:mojo_bindings", |
| 29 "//device/sensors", | 25 "//device/sensors", |
| 30 "//device/sensors/public/interfaces", | |
| 31 "//device/vibration:mojo_bindings", | 26 "//device/vibration:mojo_bindings", |
| 32 "//device/wake_lock", | 27 "//device/wake_lock", |
| 33 "//services/device/fingerprint", | 28 "//services/device/fingerprint", |
| 34 "//services/device/power_monitor", | 29 "//services/device/power_monitor", |
| 35 "//services/device/screen_orientation", | 30 "//services/device/screen_orientation", |
| 36 "//services/device/time_zone_monitor", | 31 "//services/device/time_zone_monitor", |
| 37 "//services/service_manager/public/cpp", | 32 "//services/service_manager/public/cpp", |
| 38 "//ui/gfx", | 33 "//ui/gfx", |
| 39 ] | 34 ] |
| 40 | 35 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 ] | 46 ] |
| 52 } | 47 } |
| 53 } | 48 } |
| 54 | 49 |
| 55 source_set("tests") { | 50 source_set("tests") { |
| 56 testonly = true | 51 testonly = true |
| 57 | 52 |
| 58 sources = [ | 53 sources = [ |
| 59 "power_monitor/power_monitor_message_broadcaster_unittest.cc", | 54 "power_monitor/power_monitor_message_broadcaster_unittest.cc", |
| 60 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc", | 55 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc", |
| 61 "vibration/vibration_manager_impl_unittest.cc", | |
| 62 ] | 56 ] |
| 63 | 57 |
| 64 deps = [ | 58 deps = [ |
| 65 ":test_support", | |
| 66 "//base", | 59 "//base", |
| 67 "//base/test:test_support", | 60 "//base/test:test_support", |
| 68 "//device/vibration:mojo_bindings", | |
| 69 "//mojo/public/cpp/bindings", | 61 "//mojo/public/cpp/bindings", |
| 70 "//services/device/power_monitor", | 62 "//services/device/power_monitor", |
| 71 "//services/device/public/cpp/power_monitor", | 63 "//services/device/public/cpp/power_monitor", |
| 72 "//testing/gtest", | 64 "//testing/gtest", |
| 73 ] | 65 ] |
| 74 | 66 |
| 75 if (is_chromeos) { | 67 if (is_chromeos) { |
| 76 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ] | 68 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ] |
| 77 deps += [ "//services/device/fingerprint" ] | 69 deps += [ "//services/device/fingerprint" ] |
| 78 } | 70 } |
| 79 | 71 |
| 80 if (is_android) { | 72 if (is_android) { |
| 81 deps += [ | 73 deps += [ ":device_service_jni_headers" ] |
| 82 ":device_service_jni_headers", | |
| 83 "//device/vibration/android:vibration_jni_headers", | |
| 84 ] | |
| 85 public_deps = [ | |
| 86 "//services/device:java", | |
| 87 ] | |
| 88 } else { | 74 } else { |
| 89 deps += [ | 75 deps += [ "//device/battery" ] |
| 90 "//device/battery", | |
| 91 "//device/vibration", | |
| 92 ] | |
| 93 } | 76 } |
| 94 } | 77 } |
| 95 | 78 |
| 96 service_manifest("manifest") { | 79 service_manifest("manifest") { |
| 97 name = "device" | 80 name = "device" |
| 98 source = "manifest.json" | 81 source = "manifest.json" |
| 99 } | 82 } |
| 100 | 83 |
| 101 service_manifest("unittest_manifest") { | |
| 102 name = "device_unittests" | |
| 103 source = "unittest_manifest.json" | |
| 104 packaged_services = [ ":manifest" ] | |
| 105 } | |
| 106 | |
| 107 catalog("tests_catalog") { | |
| 108 testonly = true | |
| 109 embedded_services = [ ":unittest_manifest" ] | |
| 110 } | |
| 111 | |
| 112 source_set("test_support") { | |
| 113 testonly = true | |
| 114 | |
| 115 sources = [ | |
| 116 "device_service_test_base.cc", | |
| 117 "device_service_test_base.h", | |
| 118 ] | |
| 119 | |
| 120 deps = [ | |
| 121 ":lib", | |
| 122 "//base", | |
| 123 "//base/test:test_support", | |
| 124 "//mojo/public/cpp/bindings", | |
| 125 "//services/device/public/interfaces:constants", | |
| 126 "//services/service_manager/public/cpp:service_test_support", | |
| 127 "//services/service_manager/public/cpp:sources", | |
| 128 ] | |
| 129 } | |
| 130 | |
| 131 if (is_android) { | 84 if (is_android) { |
| 132 generate_jni("device_service_jni_headers") { | 85 generate_jni("device_service_jni_headers") { |
| 133 sources = [ | 86 sources = [ |
| 134 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java", | 87 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java", |
| 135 ] | 88 ] |
| 136 jni_package = "device_service" | 89 jni_package = "device_service" |
| 137 } | 90 } |
| 138 | 91 |
| 139 android_library("java") { | 92 android_library("java") { |
| 140 # This should be visible only to embedders of the Device Service, and the | 93 # This should be visible only to embedders of the Device Service, and the |
| 141 # dependence should only be for the purpose of embedding the Device Service. | 94 # dependence should only be for the purpose of embedding the Device Service. |
| 142 # //content/public/android:* here actually wants to identify the | 95 # //content/public/android:* here actually wants to identify the |
| 143 # //content/public/android:content_java target and all of its generated | 96 # //content/public/android:content_java target and all of its generated |
| 144 # targets which also need to see this target as well. | 97 # targets which also need to see this target as well. |
| 145 visibility = [ | 98 visibility = [ "//content/public/android:*" ] |
| 146 ":tests", | |
| 147 "//content/public/android:*", | |
| 148 ] | |
| 149 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis
trar.java" ] | 99 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis
trar.java" ] |
| 150 deps = [ | 100 deps = [ |
| 151 "//base:base_java", | 101 "//base:base_java", |
| 152 "//device/battery:mojo_bindings_java", | 102 "//device/battery:mojo_bindings_java", |
| 153 "//device/battery/android:battery_monitor_java", | 103 "//device/battery/android:battery_monitor_java", |
| 154 "//device/vibration:mojo_bindings_java", | 104 "//device/vibration:mojo_bindings_java", |
| 155 "//device/vibration/android:vibration_manager_java", | 105 "//device/vibration/android:vibration_manager_java", |
| 156 "//mojo/android:system_java", | 106 "//mojo/android:system_java", |
| 157 "//mojo/public/java:bindings_java", | 107 "//mojo/public/java:bindings_java", |
| 158 "//mojo/public/java:system_java", | 108 "//mojo/public/java:system_java", |
| 159 "//services/device/screen_orientation:java", | 109 "//services/device/screen_orientation:java", |
| 160 "//services/device/time_zone_monitor:java", | 110 "//services/device/time_zone_monitor:java", |
| 161 "//services/service_manager/public/interfaces:interfaces_java", | 111 "//services/service_manager/public/interfaces:interfaces_java", |
| 162 "//services/service_manager/public/java:service_manager_java", | 112 "//services/service_manager/public/java:service_manager_java", |
| 163 ] | 113 ] |
| 164 } | 114 } |
| 165 } | 115 } |
| OLD | NEW |