| 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 28 matching lines...) Expand all Loading... |
| 39 #if ENABLE(ASSERT) | 39 #if ENABLE(ASSERT) |
| 40 // Additional event categories for verifying handler tracking logic. | 40 // Additional event categories for verifying handler tracking logic. |
| 41 EventsForTesting, | 41 EventsForTesting, |
| 42 #endif | 42 #endif |
| 43 EventHandlerClassCount, // Must be the last entry. | 43 EventHandlerClassCount, // Must be the last entry. |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 // Returns true if the FrameHost has event handlers of the specified class. | 46 // Returns true if the FrameHost has event handlers of the specified class. |
| 47 bool hasEventHandlers(EventHandlerClass) const; | 47 bool hasEventHandlers(EventHandlerClass) const; |
| 48 | 48 |
| 49 // Returns a set of EventTargets which have registered handlers of the given c
lass. | 49 // Returns a set of EventTargets which have registered handlers of the given |
| 50 // class. |
| 50 const EventTargetSet* eventHandlerTargets(EventHandlerClass) const; | 51 const EventTargetSet* eventHandlerTargets(EventHandlerClass) const; |
| 51 | 52 |
| 52 // Registration and management of event handlers attached to EventTargets. | 53 // Registration and management of event handlers attached to EventTargets. |
| 53 void didAddEventHandler(EventTarget&, | 54 void didAddEventHandler(EventTarget&, |
| 54 const AtomicString& eventType, | 55 const AtomicString& eventType, |
| 55 const AddEventListenerOptions&); | 56 const AddEventListenerOptions&); |
| 56 void didAddEventHandler(EventTarget&, EventHandlerClass); | 57 void didAddEventHandler(EventTarget&, EventHandlerClass); |
| 57 void didRemoveEventHandler(EventTarget&, | 58 void didRemoveEventHandler(EventTarget&, |
| 58 const AtomicString& eventType, | 59 const AtomicString& eventType, |
| 59 const AddEventListenerOptions&); | 60 const AddEventListenerOptions&); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 120 |
| 120 void checkConsistency() const; | 121 void checkConsistency() const; |
| 121 | 122 |
| 122 Member<FrameHost> m_frameHost; | 123 Member<FrameHost> m_frameHost; |
| 123 EventTargetSet m_targets[EventHandlerClassCount]; | 124 EventTargetSet m_targets[EventHandlerClassCount]; |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace blink | 127 } // namespace blink |
| 127 | 128 |
| 128 #endif // EventHandlerRegistry_h | 129 #endif // EventHandlerRegistry_h |
| OLD | NEW |