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/events/Event.h" | |
9 #include "core/frame/FrameHost.h" | 8 #include "core/frame/FrameHost.h" |
10 #include "wtf/HashCountedSet.h" | 9 #include "wtf/HashCountedSet.h" |
11 | 10 |
12 namespace WebCore { | 11 namespace WebCore { |
13 | 12 |
| 13 class Document; |
| 14 class EventTarget; |
| 15 |
14 typedef HashCountedSet<EventTarget*> EventTargetSet; | 16 typedef HashCountedSet<EventTarget*> EventTargetSet; |
15 | 17 |
16 // Registry for keeping track of event handlers. Note that only handlers on | 18 // Registry for keeping track of event handlers. Note that only handlers on |
17 // documents that can be rendered or can receive input (i.e., are attached to a | 19 // documents that can be rendered or can receive input (i.e., are attached to a |
18 // FrameHost) are registered here. | 20 // FrameHost) are registered here. |
19 class EventHandlerRegistry FINAL : public NoBaseWillBeGarbageCollectedFinalized<
EventHandlerRegistry> { | 21 class EventHandlerRegistry FINAL : public NoBaseWillBeGarbageCollectedFinalized<
EventHandlerRegistry> { |
20 public: | 22 public: |
21 explicit EventHandlerRegistry(FrameHost&); | 23 explicit EventHandlerRegistry(FrameHost&); |
22 virtual ~EventHandlerRegistry(); | 24 virtual ~EventHandlerRegistry(); |
23 | 25 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 89 |
88 void checkConsistency() const; | 90 void checkConsistency() const; |
89 | 91 |
90 FrameHost& m_frameHost; | 92 FrameHost& m_frameHost; |
91 EventTargetSet m_targets[EventHandlerClassCount]; | 93 EventTargetSet m_targets[EventHandlerClassCount]; |
92 }; | 94 }; |
93 | 95 |
94 } // namespace WebCore | 96 } // namespace WebCore |
95 | 97 |
96 #endif // EventHandlerRegistry_h | 98 #endif // EventHandlerRegistry_h |
OLD | NEW |