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.
5 import("//build/config/features.gni")
6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
8 # On android, BatteryManager mojo service is implemented directly in Java.
10 component("battery") {
11 output_name = "device_battery"
15 "battery_monitor_impl.cc",
16 "battery_monitor_impl.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",
28 defines = [ "DEVICE_BATTERY_IMPLEMENTATION" ]
33 "//base/third_party/dynamic_annotations",
34 "//mojo/environment:chromium",
35 "//third_party/mojo/src/mojo/public/cpp/bindings",
36 "//third_party/mojo/src/mojo/edk/system",
40 configs += [ "//build/config/linux:dbus" ]
42 "//chromeos:chromeos",
43 "//chromeos:power_manager_proto",
46 "battery_status_manager_default.cc",
47 "battery_status_manager_linux.cc",
51 if (is_desktop_linux) {
53 configs += [ "//build/config/linux:dbus" ]
55 sources -= [ "battery_status_manager_default.cc" ]
57 sources -= [ "battery_status_manager_linux.cc" ]
62 sources -= [ "battery_status_manager_default.cc" ]
66 sources -= [ "battery_status_manager_default.cc" ]
71 mojom("mojo_bindings") {
73 "battery_monitor.mojom",
74 "battery_status.mojom",