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

Unified Diff: third_party/WebKit/Source/core/input/ScrollManager.cpp

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: layouttest updated. Created 3 years, 9 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/input/ScrollManager.cpp
diff --git a/third_party/WebKit/Source/core/input/ScrollManager.cpp b/third_party/WebKit/Source/core/input/ScrollManager.cpp
index 3e6d4638681cfec8e6e42006dd88d629884d2035..7ab853793d1bf0b12a4f22641e664daa621654c1 100644
--- a/third_party/WebKit/Source/core/input/ScrollManager.cpp
+++ b/third_party/WebKit/Source/core/input/ScrollManager.cpp
@@ -236,6 +236,12 @@ WebInputEventResult ScrollManager::handleGestureScrollBegin(
m_deltaConsumedForScrollSequence;
ScrollState* scrollState = ScrollState::create(std::move(scrollStateData));
customizedScroll(*m_scrollGestureHandlingNode.get(), *scrollState);
+
+ if (gestureEvent.sourceDevice == WebGestureDeviceTouchscreen)
bokan 2017/03/09 17:31:03 Put this in a method on Page and share it between
bokan 2017/03/09 18:31:15 Actually, I guess this wouldn't really help much.
sahel 2017/03/10 16:21:33 Acknowledged.
+ UseCounter::count(m_frame->document(), UseCounter::ScrollByTouch);
+ else
+ UseCounter::count(m_frame->document(), UseCounter::ScrollByWheel);
+
return WebInputEventResult::HandledSystem;
}

Powered by Google App Engine
This is Rietveld 408576698