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

Unified Diff: device/battery/BUILD.gn

Issue 457933002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/battery/BUILD.gn
diff --git a/device/battery/BUILD.gn b/device/battery/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..b5726a8c8ece8600630d338f91e724d2d8e8bfd6
--- /dev/null
+++ b/device/battery/BUILD.gn
@@ -0,0 +1,90 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+import("//mojo/public/tools/bindings/mojom.gni")
+
+component("battery") {
+ output_name = "device_battery"
+
+ sources = [
+ "battery_export.h",
+ "battery_monitor_impl.cc",
+ "battery_monitor_impl.h",
+ "battery_status_manager_android.cc",
+ "battery_status_manager_android.h",
+ "battery_status_manager_chromeos.cc",
+ "battery_status_manager_default.cc",
+ "battery_status_manager_linux.cc",
+ "battery_status_manager_linux.h",
+ "battery_status_manager_mac.cc",
+ "battery_status_manager_win.cc",
+ "battery_status_manager_win.h",
+ "battery_status_service.cc",
+ "battery_status_service.h",
+ ]
+
+ defines = [
+ "DEVICE_BATTERY_IMPLEMENTATION",
+ ]
+
+ deps = [
+ ":mojo_bindings",
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//mojo/environment:chromium",
+ "//mojo/public/cpp/bindings",
+ "//mojo/system",
+ ]
+
+ if (is_chromeos) {
+ configs += [
+ "//build/config/linux:dbus",
+ ]
+ deps += [
+ "//chromeos:power_manager_proto",
+ ]
+ sources -= [
+ "battery_status_manager_default.cc",
+ "battery_status_manager_linux.cc",
+ ]
+ }
+
+ if (is_linux) {
+ if (use_dbus) {
+ configs += [
+ "//build/config/linux:dbus",
+ ]
+ deps += [
+ "//dbus"
+ ]
+ sources -= [
+ "battery_status_manager_default.cc",
+ ]
+ } else {
+ sources -= [
+ "battery_status_manager_linux.cc",
+ ]
+ }
+ }
+
+ if (is_mac) {
+ sources -= [
+ "battery_status_manager_default.cc",
+ ]
+ }
+
+ if (is_win) {
+ sources -= [
+ "battery_status_manager_default.cc",
+ ]
+ }
+}
+
+mojom("mojo_bindings") {
+ sources = [
+ "battery_monitor.mojom",
+ "battery_status.mojom",
+ ]
+}
« 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