Index: content/browser/renderer_host/input/input_router_impl.cc |
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc |
index e6ddcd9ed7f0604b966f382d39266f4c7ed7f984..184eefe046885d3d0b82e4720f140bcb80d3ca11 100644 |
--- a/content/browser/renderer_host/input/input_router_impl.cc |
+++ b/content/browser/renderer_host/input/input_router_impl.cc |
@@ -62,6 +62,12 @@ const char* GetEventAckName(InputEventAckState ack_result) { |
return ""; |
} |
+enum TouchEventDispatchResultType { |
+ UNHANDLED_TOUCHES, // Unhandled touch events. |
+ HANDLED_TOUCHES, // Handled touch events. |
+ TOUCH_EVENT_DISPATCH_RESULT_TYPE_COUNT |
+}; |
+ |
} // namespace |
InputRouterImpl::Config::Config() { |
@@ -454,6 +460,16 @@ void InputRouterImpl::OnInputEventAck(const InputEventAck& ack) { |
OnDidOverscroll(*ack.overscroll); |
} |
+ // Count the canceled touch starts while there is an active fling animation. |
+ if (gesture_event_queue_.FlingInProgress() && |
+ ack.type == WebInputEvent::TouchStart) { |
+ TouchEventDispatchResultType result = |
+ (ack.state == INPUT_EVENT_ACK_STATE_CONSUMED) ? HANDLED_TOUCHES |
dtapuska
2016/04/27 19:05:13
I presume the passive ones counted as unhandled is
|
+ : UNHANDLED_TOUCHES; |
+ UMA_HISTOGRAM_ENUMERATION("Event.Touch.TouchStartsCanceledDuringFling", |
+ result, TOUCH_EVENT_DISPATCH_RESULT_TYPE_COUNT); |
+ } |
+ |
ProcessInputEventAck(ack.type, ack.state, ack.latency, |
ack.unique_touch_event_id, RENDERER); |
} |