| 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 18 matching lines...) Expand all Loading... |
| 29 // Supported event handler classes. Note that each one may correspond to | 29 // Supported event handler classes. Note that each one may correspond to |
| 30 // multiple event types. | 30 // multiple event types. |
| 31 enum EventHandlerClass { | 31 enum EventHandlerClass { |
| 32 ScrollEvent, | 32 ScrollEvent, |
| 33 WheelEventBlocking, | 33 WheelEventBlocking, |
| 34 WheelEventPassive, | 34 WheelEventPassive, |
| 35 TouchStartOrMoveEventBlocking, | 35 TouchStartOrMoveEventBlocking, |
| 36 TouchStartOrMoveEventPassive, | 36 TouchStartOrMoveEventPassive, |
| 37 TouchEndOrCancelEventBlocking, | 37 TouchEndOrCancelEventBlocking, |
| 38 TouchEndOrCancelEventPassive, | 38 TouchEndOrCancelEventPassive, |
| 39 #if ENABLE(ASSERT) | 39 #if DCHECK_IS_ON() |
| 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 | 49 // Returns a set of EventTargets which have registered handlers of the given |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 void checkConsistency() const; | 118 void checkConsistency() const; |
| 119 | 119 |
| 120 Member<FrameHost> m_frameHost; | 120 Member<FrameHost> m_frameHost; |
| 121 EventTargetSet m_targets[EventHandlerClassCount]; | 121 EventTargetSet m_targets[EventHandlerClassCount]; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| 125 | 125 |
| 126 #endif // EventHandlerRegistry_h | 126 #endif // EventHandlerRegistry_h |
| OLD | NEW |