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 BatteryDispatcher_h | |
6 #define BatteryDispatcher_h | |
7 | |
8 #include "core/frame/DeviceSensorEventDispatcher.h" | |
9 #include "modules/battery/BatteryManager.h" | |
10 #include "public/platform/WebBatteryListener.h" | |
11 | |
12 namespace blink { | |
13 class WebBatteryStatus; | |
14 } | |
15 | |
16 namespace WebCore { | |
17 | |
18 class BatteryDispatcher FINAL : public DeviceSensorEventDispatcher, public blink ::WebBatteryListener { | |
19 public: | |
20 static BatteryDispatcher& instance(); | |
21 virtual ~BatteryDispatcher(); | |
22 | |
23 void addClient(BatteryManager*); | |
24 void removeClient(BatteryManager*); | |
25 | |
26 virtual void updateBatteryStatus(const blink::WebBatteryStatus&) OVERRIDE; | |
27 void didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<Batter yStatus>); | |
timvolodine
2014/04/02 14:24:51
does this method need to be public?
Srini
2014/04/02 17:25:36
Nope. I'll fix this.
| |
28 | |
29 private: | |
30 BatteryDispatcher(); | |
31 RefPtr<BatteryStatus> m_batteryStatus; | |
32 | |
33 virtual void startListening() OVERRIDE; | |
34 virtual void stopListening() OVERRIDE; | |
35 }; | |
36 | |
37 } | |
38 | |
39 #endif // BatteryDispatcher_h | |
OLD | NEW |