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

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

Issue 619383002: Move PlatformEventDispatcher implementations to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix non-Oilpan allocation of DeviceLightDispatcher singleton 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
« no previous file with comments | « no previous file | Source/core/frame/PlatformEventDispatcher.cpp » ('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 PlatformEventDispatcher_h 5 #ifndef PlatformEventDispatcher_h
6 #define PlatformEventDispatcher_h 6 #define PlatformEventDispatcher_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "wtf/Vector.h" 9 #include "wtf/Vector.h"
10 10
11 namespace blink { 11 namespace blink {
12 class PlatformEventController; 12 class PlatformEventController;
13 13
14 class PlatformEventDispatcher { 14 class PlatformEventDispatcher : public GarbageCollectedMixin {
15 public: 15 public:
16 void addController(PlatformEventController*); 16 void addController(PlatformEventController*);
17 void removeController(PlatformEventController*); 17 void removeController(PlatformEventController*);
18 18
19 virtual void trace(Visitor*);
20
19 protected: 21 protected:
20 PlatformEventDispatcher(); 22 PlatformEventDispatcher();
21 virtual ~PlatformEventDispatcher();
22 23
23 void notifyControllers(); 24 void notifyControllers();
24 25
25 virtual void startListening() = 0; 26 virtual void startListening() = 0;
26 virtual void stopListening() = 0; 27 virtual void stopListening() = 0;
27 28
28 private: 29 private:
29 void purgeControllers(); 30 void purgeControllers();
30 31
31 WillBePersistentHeapVector<RawPtrWillBeMember<PlatformEventController> > m_c ontrollers; 32 #if ENABLE(OILPAN)
33 void clearWeakMembers(Visitor*);
34 #endif
35
36 WillBeHeapVector<PlatformEventController*> m_controllers;
32 bool m_needsPurge; 37 bool m_needsPurge;
33 bool m_isDispatching; 38 bool m_isDispatching;
34 }; 39 };
35 40
36 } // namespace blink 41 } // namespace blink
37 42
38 #endif // PlatformEventDispatcher_h 43 #endif // PlatformEventDispatcher_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/PlatformEventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698