Index: device/battery/battery_monitor_impl.h |
diff --git a/device/battery/battery_monitor_impl.h b/device/battery/battery_monitor_impl.h |
index 7916b0d2b4adb97155844a0d2abfa2b480b422b4..5c648434001a15c8c0ab4b57b9f7284df05c6f03 100644 |
--- a/device/battery/battery_monitor_impl.h |
+++ b/device/battery/battery_monitor_impl.h |
@@ -1,34 +1,32 @@ |
// 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. |
- |
-#ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_ |
-#define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_ |
#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" |
-#include "mojo/public/cpp/bindings/strong_binding.h" |
+ |
+#ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_ |
+#define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_ |
namespace device { |
-class BatteryMonitorImpl : public BatteryMonitor { |
+class BatteryMonitorImpl : public mojo::InterfaceImpl<BatteryMonitor> { |
public: |
DEVICE_BATTERY_EXPORT static void Create( |
mojo::InterfaceRequest<BatteryMonitor> request); |
private: |
- explicit BatteryMonitorImpl(mojo::InterfaceRequest<BatteryMonitor> request); |
+ BatteryMonitorImpl(); |
~BatteryMonitorImpl() override; |
- void RegisterSubscription(); |
+ // mojo::InterfaceImpl<..> methods: |
+ void OnConnectionEstablished() override; |
+ |
void DidChange(const BatteryStatus& battery_status); |
- mojo::StrongBinding<BatteryMonitor> binding_; |
scoped_ptr<BatteryStatusService::BatteryUpdateSubscription> subscription_; |
- |
- DISALLOW_COPY_AND_ASSIGN(BatteryMonitorImpl); |
}; |
} // namespace device |