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

Side by Side Diff: sky/engine/core/frame/EventHandlerRegistry.h

Issue 686783002: Remove almost all of Oilpan (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/frame/EventHandlerRegistry.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 EventHandlerRegistry_h 5 #ifndef EventHandlerRegistry_h
6 #define EventHandlerRegistry_h 6 #define EventHandlerRegistry_h
7 7
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "wtf/HashCountedSet.h" 9 #include "wtf/HashCountedSet.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void didMoveIntoFrameHost(EventTarget&); 52 void didMoveIntoFrameHost(EventTarget&);
53 void didMoveOutOfFrameHost(EventTarget&); 53 void didMoveOutOfFrameHost(EventTarget&);
54 static void didMoveBetweenFrameHosts(EventTarget&, FrameHost* oldFrameHost, FrameHost* newFrameHost); 54 static void didMoveBetweenFrameHosts(EventTarget&, FrameHost* oldFrameHost, FrameHost* newFrameHost);
55 55
56 // Either |documentDetached| or |didMove{Into,OutOf,Between}FrameHosts| must 56 // Either |documentDetached| or |didMove{Into,OutOf,Between}FrameHosts| must
57 // be called whenever the FrameHost that is associated with a registered eve nt 57 // be called whenever the FrameHost that is associated with a registered eve nt
58 // target changes. This ensures the registry does not end up with stale 58 // target changes. This ensures the registry does not end up with stale
59 // references to handlers that are no longer related to it. 59 // references to handlers that are no longer related to it.
60 void documentDetached(Document&); 60 void documentDetached(Document&);
61 61
62 void trace(Visitor*);
63 void clearWeakMembers(Visitor*);
64
65 private: 62 private:
66 enum ChangeOperation { 63 enum ChangeOperation {
67 Add, // Add a new event handler. 64 Add, // Add a new event handler.
68 Remove, // Remove an existing event handler. 65 Remove, // Remove an existing event handler.
69 RemoveAll // Remove any and all existing event handlers for a given targ et. 66 RemoveAll // Remove any and all existing event handlers for a given targ et.
70 }; 67 };
71 68
72 // Returns true if |eventType| belongs to a class this registry tracks. 69 // Returns true if |eventType| belongs to a class this registry tracks.
73 static bool eventTypeToClass(const AtomicString& eventType, EventHandlerClas s* result); 70 static bool eventTypeToClass(const AtomicString& eventType, EventHandlerClas s* result);
74 71
(...skipping 22 matching lines...) Expand all
97 94
98 void checkConsistency() const; 95 void checkConsistency() const;
99 96
100 FrameHost& m_frameHost; 97 FrameHost& m_frameHost;
101 EventTargetSet m_targets[EventHandlerClassCount]; 98 EventTargetSet m_targets[EventHandlerClassCount];
102 }; 99 };
103 100
104 } // namespace blink 101 } // namespace blink
105 102
106 #endif // EventHandlerRegistry_h 103 #endif // EventHandlerRegistry_h
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/frame/EventHandlerRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698