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

Unified Diff: device/battery/battery_monitor_impl.h

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 | « device/battery/battery_monitor.mojom ('k') | device/battery/battery_monitor_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/battery/battery_monitor_impl.h
diff --git a/device/battery/battery_monitor_impl.h b/device/battery/battery_monitor_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0cc76917ef8b54a9b1d402ea7170f7b5513f190
--- /dev/null
+++ b/device/battery/battery_monitor_impl.h
@@ -0,0 +1,34 @@
+// 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.
+
+#include "base/memory/scoped_ptr.h"
+#include "device/battery/battery_export.h"
+#include "device/battery/battery_monitor.mojom.h"
+#include "device/battery/battery_status_service.h"
+
+#ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
+#define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
+
+namespace device {
+
+class BatteryMonitorImpl : public mojo::InterfaceImpl<BatteryMonitor> {
+ public:
+ DEVICE_BATTERY_EXPORT static void Create(
+ mojo::InterfaceRequest<BatteryMonitor> request);
+
+ private:
+ BatteryMonitorImpl();
+ virtual ~BatteryMonitorImpl();
+
+ // mojo::InterfaceImpl<..> methods:
+ virtual void OnConnectionEstablished() OVERRIDE;
+
+ void DidChange(const BatteryStatus& battery_status);
+
+ scoped_ptr<BatteryStatusService::BatteryUpdateSubscription> subscription_;
+};
+
+} // namespace device
+
+#endif // DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
« no previous file with comments | « device/battery/battery_monitor.mojom ('k') | device/battery/battery_monitor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698