Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.h

Issue 2134063002: Remove DOMWindowLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698