| Index: content/browser/renderer_host/input/input_router_impl.h
|
| diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
|
| index 8c512348a6bcf93988e02c4bf627d8055f9ce7fe..a586d5d339e382396f40cd49b5b7e5d491d0e1dd 100644
|
| --- a/content/browser/renderer_host/input/input_router_impl.h
|
| +++ b/content/browser/renderer_host/input/input_router_impl.h
|
| @@ -118,6 +118,26 @@ private:
|
| const ui::LatencyInfo& latency_info,
|
| bool is_keyboard_shortcut);
|
|
|
| + // A data structure that attaches some metadata to a WebMouseWheelEvent
|
| + // and its latency info.
|
| + struct QueuedWheelEvent {
|
| + QueuedWheelEvent();
|
| + QueuedWheelEvent(const MouseWheelEventWithLatencyInfo& event,
|
| + bool synthesized_from_pinch);
|
| + ~QueuedWheelEvent();
|
| +
|
| + MouseWheelEventWithLatencyInfo event;
|
| + bool synthesized_from_pinch;
|
| + };
|
| +
|
| + // Enqueue or send a mouse wheel event.
|
| + void SendWheelEvent(const QueuedWheelEvent& wheel_event);
|
| +
|
| + // Given a Touchpad GesturePinchUpdate event, create and send a synthetic
|
| + // wheel event for it.
|
| + void SendSyntheticWheelEventForPinch(
|
| + const GestureEventWithLatencyInfo& pinch_event);
|
| +
|
| // IPC message handlers
|
| void OnInputEventAck(blink::WebInputEvent::Type event_type,
|
| InputEventAckState ack_result,
|
| @@ -216,7 +236,7 @@ private:
|
| // (Similar to |mouse_move_pending_|.) True if a mouse wheel event was sent
|
| // and we are waiting for a corresponding ack.
|
| bool mouse_wheel_pending_;
|
| - MouseWheelEventWithLatencyInfo current_wheel_event_;
|
| + QueuedWheelEvent current_wheel_event_;
|
|
|
| // (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
|
| // Unlike mouse moves, mouse wheel events received while one is pending are
|
| @@ -225,7 +245,7 @@ private:
|
| // high rate; not waiting for the ack results in jankiness, and using the same
|
| // mechanism as for mouse moves (just dropping old events when multiple ones
|
| // would be queued) results in very slow scrolling.
|
| - typedef std::deque<MouseWheelEventWithLatencyInfo> WheelEventQueue;
|
| + typedef std::deque<QueuedWheelEvent> WheelEventQueue;
|
| WheelEventQueue coalesced_mouse_wheel_events_;
|
|
|
| // A queue of keyboard events. We can't trust data from the renderer so we
|
|
|