Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: services/device/BUILD.gn

Issue 2643713002: Port BatteryMonitor into Device Service (Closed)
Patch Set: Self-review Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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("//services/service_manager/public/cpp/service.gni") 6 import("//services/service_manager/public/cpp/service.gni")
6 import("//services/service_manager/public/service_manifest.gni") 7 import("//services/service_manager/public/service_manifest.gni")
7 8
9 if (is_android) {
10 import("//build/config/android/rules.gni") # For generate_jni().
11 }
12
8 source_set("lib") { 13 source_set("lib") {
9 sources = [ 14 sources = [
10 "device_service.cc", 15 "device_service.cc",
11 "device_service.h", 16 "device_service.h",
12 ] 17 ]
13 18
14 deps = [ 19 deps = [
15 "//base", 20 "//base",
21 "//device/battery",
22 "//device/battery:mojo_bindings",
16 "//device/power_monitor", 23 "//device/power_monitor",
17 "//device/time_zone_monitor", 24 "//device/time_zone_monitor",
18 "//services/service_manager/public/cpp", 25 "//services/service_manager/public/cpp",
19 ] 26 ]
20 27
21 public_deps = [ 28 public_deps = [
22 # TODO(blundell): This dep shouldn't be necessary at all, 29 # TODO(blundell): This dep shouldn't be necessary at all,
23 # but content_shell fails to link in the component build if 30 # but content_shell fails to link in the component build if
24 # this isn't here as a public_dep. 31 # this isn't here as a public_dep.
25 "//device/time_zone_monitor/public/interfaces", 32 "//device/time_zone_monitor/public/interfaces",
26 ] 33 ]
27 34
28 data_deps = [ 35 data_deps = [
29 ":manifest", 36 ":manifest",
30 ] 37 ]
38
39 if (is_android) {
40 deps -= [ "//device/battery" ]
Sam McNally 2017/01/25 05:53:06 if (is_android) { deps += [ ":device_service_jni
blundell 2017/01/25 15:00:34 Done.
41
42 deps += [ ":device_service_jni_headers" ]
43 }
31 } 44 }
32 45
33 service_manifest("manifest") { 46 service_manifest("manifest") {
34 name = "device" 47 name = "device"
35 source = "manifest.json" 48 source = "manifest.json"
36 } 49 }
50
51 if (is_android) {
52 generate_jni("device_service_jni_headers") {
53 sources = [
54 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java",
55 ]
56 jni_package = "device_service"
57 }
58
59 android_library("java") {
60 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ]
61 deps = [
62 "//base:base_java",
63 "//device/battery:mojo_bindings_java",
64 "//device/battery/android:battery_monitor_java",
65 "//mojo/android:system_java",
66 "//mojo/public/java:bindings_java",
67 "//mojo/public/java:system_java",
68 "//services/service_manager/public/interfaces:interfaces_java",
69 "//services/service_manager/public/java:service_manager_java",
70 ]
71 }
72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698