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 "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/battery/BatteryManager.h" | |
11 #include "modules/battery/battery_status.h" | 10 #include "modules/battery/battery_status.h" |
12 #include "services/device/public/interfaces/battery_monitor.mojom-blink.h" | 11 #include "services/device/public/interfaces/battery_monitor.mojom-blink.h" |
13 | 12 |
14 namespace blink { | 13 namespace blink { |
15 | 14 |
16 class MODULES_EXPORT BatteryDispatcher final | 15 class MODULES_EXPORT BatteryDispatcher final |
17 : public GarbageCollectedFinalized<BatteryDispatcher>, | 16 : public GarbageCollectedFinalized<BatteryDispatcher>, |
18 public PlatformEventDispatcher { | 17 public PlatformEventDispatcher { |
19 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher); | 18 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher); |
20 WTF_MAKE_NONCOPYABLE(BatteryDispatcher); | 19 WTF_MAKE_NONCOPYABLE(BatteryDispatcher); |
(...skipping 17 matching lines...) Expand all Loading... |
38 void StopListening() override; | 37 void StopListening() override; |
39 | 38 |
40 device::mojom::blink::BatteryMonitorPtr monitor_; | 39 device::mojom::blink::BatteryMonitorPtr monitor_; |
41 BatteryStatus battery_status_; | 40 BatteryStatus battery_status_; |
42 bool has_latest_data_; | 41 bool has_latest_data_; |
43 }; | 42 }; |
44 | 43 |
45 } // namespace blink | 44 } // namespace blink |
46 | 45 |
47 #endif // BatteryDispatcher_h | 46 #endif // BatteryDispatcher_h |
OLD | NEW |