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

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

Issue 2205523004: Refactored UseCounter code for event-listener-firing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO for the suspicious |if|. Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a4ea66f2908df63c533af40e1994191d00cac6fe..0a2f3d60b2c55450060623223eca55bd72e0c609 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.h
+++ b/third_party/WebKit/Source/core/events/EventTarget.h
@@ -42,6 +42,7 @@
#include "core/events/AddEventListenerOptionsResolved.h"
#include "core/events/EventDispatchResult.h"
#include "core/events/EventListenerMap.h"
+#include "core/frame/UseCounter.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/text/AtomicString.h"
@@ -175,6 +176,10 @@ protected:
private:
LocalDOMWindow* executingWindow();
void setDefaultAddEventListenerOptions(const AtomicString& eventType, AddEventListenerOptionsResolved&);
+
+ // UseCounts the event if it has the specified type. Returns true iff the event type matches.
+ bool checkTypeThenUseCount(const Event*, const AtomicString&, const UseCounter::Feature);
+
bool fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVector*, EventListenerVector*);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698