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

Side by Side Diff: Source/core/frame/DeviceEventDispatcherBase.h

Issue 315573002: Generalize and refactor DeviceSensorEvent* architecture to support multi-event type targets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add stopUpdating in destructor of BatteryManager. Created 6 years, 6 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 | Annotate | Revision Log
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 DeviceEventDispatcherBase_h
6 #define DeviceEventDispatcherBase_h
7
8 #include "wtf/Vector.h"
9
10 namespace WebCore {
11 class DeviceEventControllerBase;
12
13 class DeviceEventDispatcherBase {
14 public:
15 void addController(DeviceEventControllerBase*);
16 void removeController(DeviceEventControllerBase*);
17
18 protected:
19 DeviceEventDispatcherBase();
20 virtual ~DeviceEventDispatcherBase();
21
22 void notifyControllers();
23
24 virtual void startListening() = 0;
25 virtual void stopListening() = 0;
26
27 private:
28 void purgeControllers();
29
30 Vector<DeviceEventControllerBase*> m_controllers;
31 bool m_needsPurge;
32 bool m_isDispatching;
33 };
34
35 } // namespace WebCore
36
37 #endif // DeviceEventDispatcherBase_h
OLDNEW
« no previous file with comments | « Source/core/frame/DeviceEventControllerBase.cpp ('k') | Source/core/frame/DeviceEventDispatcherBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698