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

Unified Diff: content/renderer/input/input_event_filter.cc

Issue 1923973002: Add UMA metric for tracking listeners for blocking touch while fling is happening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change comments in histogram 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 | « content/renderer/input/input_event_filter.h ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_event_filter.cc
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index ddb4854e0cf4bed73695eb544cba76c22a678e6c..109b4fe9ed029a4d005d4e0bbe96ff5ef64993ea 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -59,6 +59,15 @@ void InputEventFilter::SetBoundHandler(const Handler& handler) {
handler_ = handler;
}
+void InputEventFilter::SetIsFlingingInMainThreadEventQueue(int routing_id,
+ bool is_flinging) {
+ RouteQueueMap::iterator iter = route_queues_.find(routing_id);
+ if (iter == route_queues_.end() || !iter->second)
+ return;
+
+ iter->second->set_is_flinging(is_flinging);
+}
+
void InputEventFilter::DidAddInputHandler(int routing_id) {
base::AutoLock locked(routes_lock_);
routes_.insert(routing_id);
@@ -82,7 +91,12 @@ void InputEventFilter::DidOverscroll(int routing_id,
new InputHostMsg_DidOverscroll(routing_id, params)));
}
+void InputEventFilter::DidStartFlinging(int routing_id) {
+ SetIsFlingingInMainThreadEventQueue(routing_id, true);
+}
+
void InputEventFilter::DidStopFlinging(int routing_id) {
+ SetIsFlingingInMainThreadEventQueue(routing_id, false);
SendMessage(base::WrapUnique(new InputHostMsg_DidStopFlinging(routing_id)));
}
« no previous file with comments | « content/renderer/input/input_event_filter.h ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698