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

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

Issue 774353003: gn format // (the rest) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase net Created 6 years 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
« no previous file with comments | « dbus/BUILD.gn ('k') | device/hid/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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("//mojo/public/tools/bindings/mojom.gni") 6 import("//mojo/public/tools/bindings/mojom.gni")
7 7
8 component("battery") { 8 component("battery") {
9 output_name = "device_battery" 9 output_name = "device_battery"
10 10
11 sources = [ 11 sources = [
12 "battery_export.h", 12 "battery_export.h",
13 "battery_monitor_impl.cc", 13 "battery_monitor_impl.cc",
14 "battery_monitor_impl.h", 14 "battery_monitor_impl.h",
15 "battery_status_manager_android.cc", 15 "battery_status_manager_android.cc",
16 "battery_status_manager_android.h", 16 "battery_status_manager_android.h",
17 "battery_status_manager_chromeos.cc", 17 "battery_status_manager_chromeos.cc",
18 "battery_status_manager_default.cc", 18 "battery_status_manager_default.cc",
19 "battery_status_manager_linux.cc", 19 "battery_status_manager_linux.cc",
20 "battery_status_manager_linux.h", 20 "battery_status_manager_linux.h",
21 "battery_status_manager_mac.cc", 21 "battery_status_manager_mac.cc",
22 "battery_status_manager_win.cc", 22 "battery_status_manager_win.cc",
23 "battery_status_manager_win.h", 23 "battery_status_manager_win.h",
24 "battery_status_service.cc", 24 "battery_status_service.cc",
25 "battery_status_service.h", 25 "battery_status_service.h",
26 ] 26 ]
27 27
28 defines = [ 28 defines = [ "DEVICE_BATTERY_IMPLEMENTATION" ]
29 "DEVICE_BATTERY_IMPLEMENTATION",
30 ]
31 29
32 deps = [ 30 deps = [
33 ":mojo_bindings", 31 ":mojo_bindings",
34 "//base", 32 "//base",
35 "//base/third_party/dynamic_annotations", 33 "//base/third_party/dynamic_annotations",
36 "//mojo/environment:chromium", 34 "//mojo/environment:chromium",
37 "//mojo/public/cpp/bindings", 35 "//mojo/public/cpp/bindings",
38 "//mojo/edk/system", 36 "//mojo/edk/system",
39 ] 37 ]
40 38
41 if (is_android) { 39 if (is_android) {
42 deps += [ 40 deps += [ "//device/battery/android:battery_jni_headers" ]
43 "//device/battery/android:battery_jni_headers",
44 ]
45 sources += [ 41 sources += [
46 "android/battery_jni_registrar.h", 42 "android/battery_jni_registrar.h",
47 "android/battery_jni_registrar.cc", 43 "android/battery_jni_registrar.cc",
48 ] 44 ]
49 sources -= [ 45 sources -= [ "battery_status_manager_default.cc" ]
50 "battery_status_manager_default.cc",
51 ]
52 } 46 }
53 47
54 if (is_chromeos) { 48 if (is_chromeos) {
55 configs += [ 49 configs += [ "//build/config/linux:dbus" ]
56 "//build/config/linux:dbus", 50 deps += [ "//chromeos:power_manager_proto" ]
57 ]
58 deps += [
59 "//chromeos:power_manager_proto",
60 ]
61 sources -= [ 51 sources -= [
62 "battery_status_manager_default.cc", 52 "battery_status_manager_default.cc",
63 "battery_status_manager_linux.cc", 53 "battery_status_manager_linux.cc",
64 ] 54 ]
65 } 55 }
66 56
67 if (is_desktop_linux) { 57 if (is_desktop_linux) {
68 if (use_dbus) { 58 if (use_dbus) {
69 configs += [ 59 configs += [ "//build/config/linux:dbus" ]
70 "//build/config/linux:dbus", 60 deps += [ "//dbus" ]
71 ] 61 sources -= [ "battery_status_manager_default.cc" ]
72 deps += [
73 "//dbus"
74 ]
75 sources -= [
76 "battery_status_manager_default.cc",
77 ]
78 } else { 62 } else {
79 sources -= [ 63 sources -= [ "battery_status_manager_linux.cc" ]
80 "battery_status_manager_linux.cc",
81 ]
82 } 64 }
83 } 65 }
84 66
85 if (is_mac) { 67 if (is_mac) {
86 sources -= [ 68 sources -= [ "battery_status_manager_default.cc" ]
87 "battery_status_manager_default.cc",
88 ]
89 } 69 }
90 70
91 if (is_win) { 71 if (is_win) {
92 sources -= [ 72 sources -= [ "battery_status_manager_default.cc" ]
93 "battery_status_manager_default.cc",
94 ]
95 } 73 }
96 } 74 }
97 75
98 mojom("mojo_bindings") { 76 mojom("mojo_bindings") {
99 sources = [ 77 sources = [
100 "battery_monitor.mojom", 78 "battery_monitor.mojom",
101 "battery_status.mojom", 79 "battery_status.mojom",
102 ] 80 ]
103 } 81 }
OLDNEW
« no previous file with comments | « dbus/BUILD.gn ('k') | device/hid/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698