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

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

Issue 1934413003: Usecounter added for counting usage of addEventListener for PointerEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/events/EventUtil.h » ('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.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index fa2bd91f48672f34686e457e579d92afd6189357..dfe136542159b36583543aeb3de6814ad6c86932 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -37,6 +37,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/editing/Editor.h"
#include "core/events/Event.h"
+#include "core/events/EventUtil.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/UseCounter.h"
@@ -184,6 +185,11 @@ bool EventTarget::addEventListenerInternal(const AtomicString& eventType, EventL
void EventTarget::addedEventListener(const AtomicString& eventType, RegisteredEventListener& registeredListener)
{
+ if (EventUtil::isPointerEventType(eventType)) {
+ if (LocalDOMWindow* executingWindow = this->executingWindow()) {
+ UseCounter::count(executingWindow->document(), UseCounter::PointerEventAddListenerCount);
+ }
+ }
}
bool EventTarget::removeEventListener(const AtomicString& eventType, const EventListener* listener, bool useCapture)
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/events/EventUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698