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

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

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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/immediate_input_router.cc
diff --git a/content/browser/renderer_host/input/immediate_input_router.cc b/content/browser/renderer_host/input/immediate_input_router.cc
index a4c69054fd16cb8838053438b95b287a81ae904c..d1dc0a776663c61a4ec7e354f2eec4d3bcce266e 100644
--- a/content/browser/renderer_host/input/immediate_input_router.cc
+++ b/content/browser/renderer_host/input/immediate_input_router.cc
@@ -481,11 +481,11 @@ void ImmediateInputRouter::ProcessInputEventAck(
} else if (WebInputEvent::isKeyboardEventType(type)) {
ProcessKeyboardAck(type, ack_result);
} else if (type == WebInputEvent::MouseWheel) {
- ProcessWheelAck(ack_result);
+ ProcessWheelAck(ack_result, latency_info);
} else if (WebInputEvent::isTouchEventType(type)) {
ProcessTouchAck(ack_result, latency_info);
} else if (WebInputEvent::isGestureEventType(type)) {
- ProcessGestureAck(type, ack_result);
+ ProcessGestureAck(type, ack_result, latency_info);
}
// WARNING: |this| may be deleted at this point.
@@ -524,13 +524,15 @@ void ImmediateInputRouter::ProcessKeyboardAck(
}
}
-void ImmediateInputRouter::ProcessWheelAck(InputEventAckState ack_result) {
+void ImmediateInputRouter::ProcessWheelAck(InputEventAckState ack_result,
+ const ui::LatencyInfo& latency) {
mouse_wheel_pending_ = false;
// Process the unhandled wheel event here before calling
// ForwardWheelEventWithLatencyInfo() since it will mutate
// current_wheel_event_.
- ack_handler_->OnWheelEventAck(current_wheel_event_.event, ack_result);
+ MouseWheelEventWithLatencyInfo event(current_wheel_event_.event, latency);
+ ack_handler_->OnWheelEventAck(event, ack_result);
// Now send the next (coalesced) mouse wheel event.
if (!coalesced_mouse_wheel_events_.empty()) {
@@ -542,10 +544,12 @@ void ImmediateInputRouter::ProcessWheelAck(InputEventAckState ack_result) {
}
void ImmediateInputRouter::ProcessGestureAck(int type,
- InputEventAckState ack_result) {
+ InputEventAckState ack_result,
+ const ui::LatencyInfo& latency) {
const bool processed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result);
- ack_handler_->OnGestureEventAck(
- gesture_event_filter_->GetGestureEventAwaitingAck(), ack_result);
+ GestureEventWithLatencyInfo event(
+ gesture_event_filter_->GetGestureEventAwaitingAck(), latency);
+ ack_handler_->OnGestureEventAck(event, ack_result);
gesture_event_filter_->ProcessGestureAck(processed, type);
}

Powered by Google App Engine
This is Rietveld 408576698