OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef BatteryStatusDispatcher_h |
| 6 #define BatteryStatusDispatcher_h |
| 7 |
| 8 #include "device/battery/battery_monitor.mojom.h" |
| 9 #include "platform/PlatformExport.h" |
| 10 #include "wtf/Noncopyable.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class BatteryStatusListener; |
| 15 |
| 16 class PLATFORM_EXPORT BatteryStatusDispatcher { |
| 17 WTF_MAKE_NONCOPYABLE(BatteryStatusDispatcher); |
| 18 public: |
| 19 explicit BatteryStatusDispatcher(BatteryStatusListener*); |
| 20 ~BatteryStatusDispatcher(); |
| 21 |
| 22 private: |
| 23 void queryNextStatus(); |
| 24 void onDidChange(device::BatteryStatusPtr); |
| 25 |
| 26 device::BatteryMonitorPtr m_monitor; |
| 27 BatteryStatusListener* m_listener; |
| 28 |
| 29 friend class BatteryStatusDispatcherTest; |
| 30 }; |
| 31 |
| 32 } // namespace blink |
| 33 |
| 34 #endif // BatteryStatusDispatcher_h |
OLD | NEW |