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

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

Issue 685703002: Reland "Replace Chrome IPC with Mojo IPC for querying BatteryStatus service" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tim's comments. Created 6 years, 1 month 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/edk/system",
39 ]
40
41 if (is_android) {
42 deps += [
43 "//device/battery/android:battery_jni_headers",
44 ]
45 sources += [
46 "android/battery_jni_registrar.h",
47 "android/battery_jni_registrar.cc",
48 ]
49 sources -= [
50 "battery_status_manager_default.cc",
51 ]
52 }
53
54 if (is_chromeos) {
55 configs += [
56 "//build/config/linux:dbus",
57 ]
58 deps += [
59 "//chromeos:power_manager_proto",
60 ]
61 sources -= [
62 "battery_status_manager_default.cc",
63 "battery_status_manager_linux.cc",
64 ]
65 }
66
67 if (is_linux) {
68 if (use_dbus) {
69 configs += [
70 "//build/config/linux:dbus",
71 ]
72 deps += [
73 "//dbus"
74 ]
75 sources -= [
76 "battery_status_manager_default.cc",
77 ]
78 } else {
79 sources -= [
80 "battery_status_manager_linux.cc",
81 ]
82 }
83 }
84
85 if (is_mac) {
86 sources -= [
87 "battery_status_manager_default.cc",
88 ]
89 }
90
91 if (is_win) {
92 sources -= [
93 "battery_status_manager_default.cc",
94 ]
95 }
96 }
97
98 mojom("mojo_bindings") {
99 sources = [
100 "battery_monitor.mojom",
101 "battery_status.mojom",
102 ]
103 }
OLDNEW
« no previous file with comments | « content/test/data/battery_status/battery_status_promise_resolution_test.html ('k') | device/battery/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698