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

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

Issue 592153002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN Android fixes. Created 6 years, 3 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
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/features.gni")
6 import("//mojo/public/tools/bindings/mojom.gni")
7
8 component("battery") {
9 output_name = "device_battery"
10
11 sources = [
12 "battery_export.h",
13 "battery_monitor_impl.cc",
14 "battery_monitor_impl.h",
15 "battery_status_manager_android.cc",
16 "battery_status_manager_android.h",
17 "battery_status_manager_chromeos.cc",
18 "battery_status_manager_default.cc",
19 "battery_status_manager_linux.cc",
20 "battery_status_manager_linux.h",
21 "battery_status_manager_mac.cc",
22 "battery_status_manager_win.cc",
23 "battery_status_manager_win.h",
24 "battery_status_service.cc",
25 "battery_status_service.h",
26 ]
27
28 defines = [
29 "DEVICE_BATTERY_IMPLEMENTATION",
30 ]
31
32 deps = [
33 ":mojo_bindings",
34 "//base",
35 "//base/third_party/dynamic_annotations",
36 "//mojo/environment:chromium",
37 "//mojo/public/cpp/bindings",
38 "//mojo/system",
39 ]
40
41 if (is_android) {
42 deps += [
43 "//device/battery/android:battery_jni_headers",
44 ]
45 sources -= [
46 "battery_status_manager_default.cc",
47 ]
48 }
49
50 if (is_chromeos) {
51 configs += [
52 "//build/config/linux:dbus",
53 ]
54 deps += [
55 "//chromeos:power_manager_proto",
56 ]
57 sources -= [
58 "battery_status_manager_default.cc",
59 "battery_status_manager_linux.cc",
60 ]
61 }
62
63 if (is_linux) {
64 if (use_dbus) {
65 configs += [
66 "//build/config/linux:dbus",
67 ]
68 deps += [
69 "//dbus"
70 ]
71 sources -= [
72 "battery_status_manager_default.cc",
73 ]
74 } else {
75 sources -= [
76 "battery_status_manager_linux.cc",
77 ]
78 }
79 }
80
81 if (is_mac) {
82 sources -= [
83 "battery_status_manager_default.cc",
84 ]
85 }
86
87 if (is_win) {
88 sources -= [
89 "battery_status_manager_default.cc",
90 ]
91 }
92 }
93
94 mojom("mojo_bindings") {
95 sources = [
96 "battery_monitor.mojom",
97 "battery_status.mojom",
98 ]
99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698