Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/modules/battery/BatteryDispatcher.h

Issue 212643010: Add Dispatcher class to the Battery Status API module. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « no previous file | Source/modules/battery/BatteryDispatcher.cpp » ('j') | Source/modules/battery/BatteryDispatcher.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698