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

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

Issue 466813003: Cleanup namespace usage in Source/core/modules/[battery/* to indexeddb/*] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/modules/device_light/DeviceLightDispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/battery/BatteryManager.h" 9 #include "modules/battery/BatteryManager.h"
10 #include "modules/battery/BatteryStatus.h" 10 #include "modules/battery/BatteryStatus.h"
11 #include "public/platform/WebBatteryStatusListener.h" 11 #include "public/platform/WebBatteryStatusListener.h"
12 12
13 namespace blink { 13 namespace blink {
14
14 class WebBatteryStatus; 15 class WebBatteryStatus;
15 }
16 16
17 namespace blink { 17 class BatteryDispatcher FINAL : public PlatformEventDispatcher, public WebBatter yStatusListener {
18
19 class BatteryDispatcher FINAL : public PlatformEventDispatcher, public blink::We bBatteryStatusListener {
20 public: 18 public:
21 static BatteryDispatcher& instance(); 19 static BatteryDispatcher& instance();
22 virtual ~BatteryDispatcher(); 20 virtual ~BatteryDispatcher();
23 21
24 BatteryStatus* latestData(); 22 BatteryStatus* latestData();
25 23
26 // Inherited from blink::WebBatteryStatusListener. 24 // Inherited from WebBatteryStatusListener.
27 virtual void updateBatteryStatus(const blink::WebBatteryStatus&) OVERRIDE; 25 virtual void updateBatteryStatus(const WebBatteryStatus&) OVERRIDE;
28 26
29 private: 27 private:
30 BatteryDispatcher(); 28 BatteryDispatcher();
31 29
32 // Inherited from PlatformEventDispatcher. 30 // Inherited from PlatformEventDispatcher.
33 virtual void startListening() OVERRIDE; 31 virtual void startListening() OVERRIDE;
34 virtual void stopListening() OVERRIDE; 32 virtual void stopListening() OVERRIDE;
35 33
36 RefPtrWillBePersistent<BatteryStatus> m_batteryStatus; 34 RefPtrWillBePersistent<BatteryStatus> m_batteryStatus;
37 }; 35 };
38 36
39 } 37 } // namespace blink
40 38
41 #endif // BatteryDispatcher_h 39 #endif // BatteryDispatcher_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/device_light/DeviceLightDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698