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 CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_ | |
6 #define CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "base/macros.h" | |
10 #include "content/common/content_export.h" | |
11 #include "device/battery/battery_monitor.mojom.h" | |
12 | |
13 namespace blink { | |
14 class WebBatteryStatusListener; | |
15 } | |
16 | |
17 namespace content { | |
18 | |
19 class CONTENT_EXPORT BatteryStatusDispatcher { | |
20 public: | |
21 explicit BatteryStatusDispatcher(blink::WebBatteryStatusListener* listener); | |
22 ~BatteryStatusDispatcher(); | |
23 | |
24 private: | |
25 friend class BatteryStatusDispatcherTest; | |
26 | |
27 void QueryNextStatus(); | |
28 void DidChange(device::BatteryStatusPtr battery_status); | |
29 | |
30 device::BatteryMonitorPtr monitor_; | |
31 blink::WebBatteryStatusListener* listener_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher); | |
34 }; | |
35 | |
36 } // namespace content | |
37 | |
38 #endif // CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_ | |
OLD | NEW |