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

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

Issue 618673002: Oilpan: reliably track listening PlatformEventControllers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't start updating in a stopped context Created 6 years, 2 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
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 PlatformEventDispatcher_h 5 #ifndef PlatformEventDispatcher_h
6 #define PlatformEventDispatcher_h 6 #define PlatformEventDispatcher_h
7 7
8 #include "platform/heap/Handle.h"
8 #include "wtf/Vector.h" 9 #include "wtf/Vector.h"
9 10
10 namespace blink { 11 namespace blink {
11 class PlatformEventController; 12 class PlatformEventController;
12 13
13 class PlatformEventDispatcher { 14 class PlatformEventDispatcher {
14 public: 15 public:
15 void addController(PlatformEventController*); 16 void addController(PlatformEventController*);
16 void removeController(PlatformEventController*); 17 void removeController(PlatformEventController*);
17 18
18 protected: 19 protected:
19 PlatformEventDispatcher(); 20 PlatformEventDispatcher();
20 virtual ~PlatformEventDispatcher(); 21 virtual ~PlatformEventDispatcher();
21 22
22 void notifyControllers(); 23 void notifyControllers();
23 24
24 virtual void startListening() = 0; 25 virtual void startListening() = 0;
25 virtual void stopListening() = 0; 26 virtual void stopListening() = 0;
26 27
27 private: 28 private:
28 void purgeControllers(); 29 void purgeControllers();
29 30
30 Vector<PlatformEventController*> m_controllers; 31 WillBePersistentHeapVector<RawPtrWillBeMember<PlatformEventController> > m_c ontrollers;
31 bool m_needsPurge; 32 bool m_needsPurge;
32 bool m_isDispatching; 33 bool m_isDispatching;
33 }; 34 };
34 35
35 } // namespace blink 36 } // namespace blink
36 37
37 #endif // PlatformEventDispatcher_h 38 #endif // PlatformEventDispatcher_h
OLDNEW
« no previous file with comments | « Source/core/frame/PlatformEventController.h ('k') | Source/core/frame/PlatformEventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698