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

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

Issue 2643713002: Port BatteryMonitor into Device Service (Closed)
Patch Set: Rebase 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:mojo_bindings",
16 "//device/power_monitor", 22 "//device/power_monitor",
17 "//device/time_zone_monitor", 23 "//device/time_zone_monitor",
18 "//services/service_manager/public/cpp", 24 "//services/service_manager/public/cpp",
19 ] 25 ]
20 26
21 public_deps = [ 27 public_deps = [
22 # TODO(blundell): This dep shouldn't be necessary at all, 28 # TODO(blundell): This dep shouldn't be necessary at all,
23 # but content_shell fails to link in the component build if 29 # but content_shell fails to link in the component build if
24 # this isn't here as a public_dep. 30 # this isn't here as a public_dep.
25 "//device/time_zone_monitor/public/interfaces", 31 "//device/time_zone_monitor/public/interfaces",
26 ] 32 ]
33
34 if (is_android) {
35 deps += [ ":device_service_jni_headers" ]
36 } else {
37 deps += [ "//device/battery" ]
38 }
27 } 39 }
28 40
29 service_manifest("manifest") { 41 service_manifest("manifest") {
30 name = "device" 42 name = "device"
31 source = "manifest.json" 43 source = "manifest.json"
32 } 44 }
45
46 if (is_android) {
47 generate_jni("device_service_jni_headers") {
48 sources = [
49 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java",
50 ]
51 jni_package = "device_service"
52 }
53
54 android_library("java") {
55 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ]
56 deps = [
57 "//base:base_java",
58 "//device/battery:mojo_bindings_java",
59 "//device/battery/android:battery_monitor_java",
60 "//mojo/android:system_java",
61 "//mojo/public/java:bindings_java",
62 "//mojo/public/java:system_java",
63 "//services/service_manager/public/interfaces:interfaces_java",
64 "//services/service_manager/public/java:service_manager_java",
65 ]
66 }
67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698