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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.h

Issue 1942723004: Change EventTarget callback APIs for add/RemoveEventListenerInternal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win32 signed/unsigned issue Created 4 years, 7 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/events/EventTarget.h
diff --git a/third_party/WebKit/Source/core/events/EventTarget.h b/third_party/WebKit/Source/core/events/EventTarget.h
index 827faa27bc756f05a97cfcc0991302a38498cf99..6e9612012efeb7bed821e6f9239bf677e5793031 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.h
+++ b/third_party/WebKit/Source/core/events/EventTarget.h
@@ -117,9 +117,9 @@ public:
bool addEventListener(const AtomicString& eventType, EventListener*, const EventListenerOptionsOrBoolean&);
bool addEventListener(const AtomicString& eventType, EventListener*, EventListenerOptions&);
- bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture = false);
- bool removeEventListener(const AtomicString& eventType, EventListener*, const EventListenerOptionsOrBoolean&);
- bool removeEventListener(const AtomicString& eventType, EventListener*, EventListenerOptions&);
+ bool removeEventListener(const AtomicString& eventType, const EventListener*, bool useCapture = false);
+ bool removeEventListener(const AtomicString& eventType, const EventListener*, const EventListenerOptionsOrBoolean&);
+ bool removeEventListener(const AtomicString& eventType, const EventListener*, EventListenerOptions&);
virtual void removeAllEventListeners();
DispatchEventResult dispatchEvent(Event*);
@@ -152,7 +152,15 @@ protected:
EventTarget();
virtual bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&);
- virtual bool removeEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&);
+ virtual bool removeEventListenerInternal(const AtomicString& eventType, const EventListener*, const EventListenerOptions&);
+
+ // Called when an event listener has been successfully added.
+ virtual void addedEventListener(const AtomicString& eventType, RegisteredEventListener&);
+
+ // Called when an event listener is removed. The original registration parameters of this
+ // event listener are available to be queried.
+ virtual void removedEventListener(const AtomicString& eventType, const RegisteredEventListener&);
+
virtual DispatchEventResult dispatchEventInternal(Event*);
// Subclasses should likely not override these themselves; instead, they should subclass EventTargetWithInlineData.
« no previous file with comments | « third_party/WebKit/Source/core/events/EventListenerMap.cpp ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698