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

Unified Diff: content/browser/renderer_host/input/mouse_wheel_event_queue.cc

Issue 1911963005: Fix reporting of TouchToFirstScroll latency metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few nits Created 4 years, 8 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: content/browser/renderer_host/input/mouse_wheel_event_queue.cc
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
index 2c7774bd6287663dd8313854cc0510ca65c91dc7..7124e73de4b6aeb5b9e421f5a5dce3aed976cdf2 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
@@ -171,8 +171,13 @@ void MouseWheelEventQueue::ProcessMouseWheelAck(
SendScrollBegin(scroll_update, true);
}
- if (needs_update)
- client_->ForwardGestureEvent(scroll_update);
+ if (needs_update) {
+ ui::LatencyInfo latency = ui::LatencyInfo();
+ latency.AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL, 0,
+ 0);
+ client_->ForwardGestureEventWithLatencyInfo(scroll_update, latency);
+ }
if (current_phase_ended) {
// Non-synthetic GSEs are sent when the current phase is canceled or
@@ -253,7 +258,7 @@ void MouseWheelEventQueue::SendScrollEnd(WebGestureEvent update_event,
if (scroll_end_timer_.IsRunning())
scroll_end_timer_.Reset();
}
- client_->ForwardGestureEvent(scroll_end);
+ client_->ForwardGestureEventWithLatencyInfo(scroll_end, ui::LatencyInfo());
}
void MouseWheelEventQueue::SendScrollBegin(
@@ -276,7 +281,7 @@ void MouseWheelEventQueue::SendScrollBegin(
needs_scroll_begin_ = false;
needs_scroll_end_ = true;
- client_->ForwardGestureEvent(scroll_begin);
+ client_->ForwardGestureEventWithLatencyInfo(scroll_begin, ui::LatencyInfo());
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698