| Index: Source/core/frame/EventHandlerRegistry.h
|
| diff --git a/Source/core/frame/EventHandlerRegistry.h b/Source/core/frame/EventHandlerRegistry.h
|
| index c462780348207352d934e05ea2154608acaecc5d..e3e9b5ee73566c43041cc3cddd587b7fc901a03a 100644
|
| --- a/Source/core/frame/EventHandlerRegistry.h
|
| +++ b/Source/core/frame/EventHandlerRegistry.h
|
| @@ -6,8 +6,10 @@
|
| #define EventHandlerRegistry_h
|
|
|
| #include "core/events/Event.h"
|
| +#include "core/frame/DOMWindowLifecycleObserver.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "wtf/HashCountedSet.h"
|
| +#include "wtf/HashMap.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -87,8 +89,24 @@ private:
|
|
|
| void checkConsistency() const;
|
|
|
| + class WindowObserver: public DOMWindowLifecycleObserver {
|
| + public:
|
| + WindowObserver(EventHandlerRegistry&, DOMWindow&);
|
| + virtual ~WindowObserver();
|
| +
|
| + // Inherited from DOMWindowLifecycleObserver
|
| + virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE;
|
| + virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRIDE;
|
| + virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE;
|
| +
|
| + private:
|
| + EventHandlerRegistry& m_registry;
|
| + };
|
| +
|
| FrameHost& m_frameHost;
|
| EventTargetSet m_targets[EventHandlerClassCount];
|
| +
|
| + HashMap<DOMWindow*, OwnPtr<WindowObserver> > m_windowObservers;
|
| };
|
|
|
| } // namespace WebCore
|
|
|