OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BatteryDispatcher_h | 5 #ifndef BatteryDispatcher_h |
6 #define BatteryDispatcher_h | 6 #define BatteryDispatcher_h |
7 | 7 |
8 #include "core/frame/PlatformEventDispatcher.h" | 8 #include "core/frame/PlatformEventDispatcher.h" |
9 #include "device/battery/battery_monitor.mojom-blink.h" | |
10 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
11 #include "modules/battery/BatteryManager.h" | 10 #include "modules/battery/BatteryManager.h" |
12 #include "modules/battery/battery_status.h" | 11 #include "modules/battery/battery_status.h" |
| 12 #include "services/device/public/interfaces/battery_monitor.mojom-blink.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class MODULES_EXPORT BatteryDispatcher final | 16 class MODULES_EXPORT BatteryDispatcher final |
17 : public GarbageCollectedFinalized<BatteryDispatcher>, | 17 : public GarbageCollectedFinalized<BatteryDispatcher>, |
18 public PlatformEventDispatcher { | 18 public PlatformEventDispatcher { |
19 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher); | 19 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher); |
20 WTF_MAKE_NONCOPYABLE(BatteryDispatcher); | 20 WTF_MAKE_NONCOPYABLE(BatteryDispatcher); |
21 | 21 |
22 public: | 22 public: |
(...skipping 15 matching lines...) Expand all Loading... |
38 void StopListening() override; | 38 void StopListening() override; |
39 | 39 |
40 device::mojom::blink::BatteryMonitorPtr monitor_; | 40 device::mojom::blink::BatteryMonitorPtr monitor_; |
41 BatteryStatus battery_status_; | 41 BatteryStatus battery_status_; |
42 bool has_latest_data_; | 42 bool has_latest_data_; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace blink | 45 } // namespace blink |
46 | 46 |
47 #endif // BatteryDispatcher_h | 47 #endif // BatteryDispatcher_h |
OLD | NEW |