| OLD | NEW |
| 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/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
| 10 #include "wtf/HashCountedSet.h" | 10 #include "wtf/HashCountedSet.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const AddEventListenerOptions&); | 56 const AddEventListenerOptions&); |
| 57 void didAddEventHandler(EventTarget&, EventHandlerClass); | 57 void didAddEventHandler(EventTarget&, EventHandlerClass); |
| 58 void didRemoveEventHandler(EventTarget&, | 58 void didRemoveEventHandler(EventTarget&, |
| 59 const AtomicString& eventType, | 59 const AtomicString& eventType, |
| 60 const AddEventListenerOptions&); | 60 const AddEventListenerOptions&); |
| 61 void didRemoveEventHandler(EventTarget&, EventHandlerClass); | 61 void didRemoveEventHandler(EventTarget&, EventHandlerClass); |
| 62 void didRemoveAllEventHandlers(EventTarget&); | 62 void didRemoveAllEventHandlers(EventTarget&); |
| 63 | 63 |
| 64 void didMoveIntoFrameHost(EventTarget&); | 64 void didMoveIntoFrameHost(EventTarget&); |
| 65 void didMoveOutOfFrameHost(EventTarget&); | 65 void didMoveOutOfFrameHost(EventTarget&); |
| 66 static void didMoveBetweenFrameHosts(EventTarget&, | |
| 67 FrameHost* oldFrameHost, | |
| 68 FrameHost* newFrameHost); | |
| 69 | 66 |
| 70 // Either |documentDetached| or |didMove{Into,OutOf,Between}FrameHosts| must | 67 // Either |documentDetached| or |didMove{Into,OutOf,Between}FrameHosts| must |
| 71 // be called whenever the FrameHost that is associated with a registered event | 68 // be called whenever the FrameHost that is associated with a registered event |
| 72 // target changes. This ensures the registry does not end up with stale | 69 // target changes. This ensures the registry does not end up with stale |
| 73 // references to handlers that are no longer related to it. | 70 // references to handlers that are no longer related to it. |
| 74 void documentDetached(Document&); | 71 void documentDetached(Document&); |
| 75 | 72 |
| 76 DECLARE_TRACE(); | 73 DECLARE_TRACE(); |
| 77 void clearWeakMembers(Visitor*); | 74 void clearWeakMembers(Visitor*); |
| 78 | 75 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 117 |
| 121 void checkConsistency() const; | 118 void checkConsistency() const; |
| 122 | 119 |
| 123 Member<FrameHost> m_frameHost; | 120 Member<FrameHost> m_frameHost; |
| 124 EventTargetSet m_targets[EventHandlerClassCount]; | 121 EventTargetSet m_targets[EventHandlerClassCount]; |
| 125 }; | 122 }; |
| 126 | 123 |
| 127 } // namespace blink | 124 } // namespace blink |
| 128 | 125 |
| 129 #endif // EventHandlerRegistry_h | 126 #endif // EventHandlerRegistry_h |
| OLD | NEW |