Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.h |
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.h b/third_party/WebKit/Source/core/frame/LocalDOMWindow.h |
index f96091f62ad4bb84fc393a4cbfe5f741e4532a83..663e29e9539a3f7135566c0b78f523bf0c5c5259 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.h |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.h |
@@ -30,8 +30,6 @@ |
#include "core/CoreExport.h" |
#include "core/events/EventTarget.h" |
#include "core/frame/DOMWindow.h" |
-#include "core/frame/DOMWindowLifecycleNotifier.h" |
-#include "core/frame/DOMWindowLifecycleObserver.h" |
#include "core/frame/LocalFrame.h" |
#include "core/frame/LocalFrameLifecycleObserver.h" |
#include "platform/Supplementable.h" |
@@ -65,10 +63,18 @@ enum PageshowEventPersistence { |
// Note: if you're thinking of returning something DOM-related by reference, |
// please ping dcheng@chromium.org first. You probably don't want to do that. |
-class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public Supplementable<LocalDOMWindow>, public DOMWindowLifecycleNotifier { |
+class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public Supplementable<LocalDOMWindow> { |
USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); |
USING_PRE_FINALIZER(LocalDOMWindow, dispose); |
public: |
+ |
+ class CORE_EXPORT EventListenerObserver : public GarbageCollectedMixin { |
+ public: |
+ virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) = 0; |
+ virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) = 0; |
+ virtual void didRemoveAllEventListeners(LocalDOMWindow*) = 0; |
+ }; |
+ |
static Document* createDocument(const String& mimeType, const DocumentInit&, bool forceXHTML); |
static LocalDOMWindow* create(LocalFrame& frame) |
{ |
@@ -152,6 +158,8 @@ public: |
void registerProperty(DOMWindowProperty*); |
void unregisterProperty(DOMWindowProperty*); |
+ void registerEventListenerObserver(EventListenerObserver*); |
+ |
void reset(); |
unsigned pendingUnloadEventListeners() const; |
@@ -259,6 +267,7 @@ private: |
RefPtr<SerializedScriptValue> m_pendingStateObject; |
HeapHashSet<Member<PostMessageTimer>> m_postMessageTimers; |
+ HeapHashSet<WeakMember<EventListenerObserver>> m_eventListenerObservers; |
}; |
DEFINE_TYPE_CASTS(LocalDOMWindow, DOMWindow, x, x->isLocalDOMWindow(), x.isLocalDOMWindow()); |