| Index: content/browser/renderer_host/input/touch_event_queue.h
|
| diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h
|
| index e491a624964216b304e8e2ebdffc4b89e43fb2b5..9290d400f21825a551ab246ebb808b84860a3997 100644
|
| --- a/content/browser/renderer_host/input/touch_event_queue.h
|
| +++ b/content/browser/renderer_host/input/touch_event_queue.h
|
| @@ -55,29 +55,12 @@
|
| TOUCH_SCROLLING_MODE_DEFAULT = TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE
|
| };
|
|
|
| - struct CONTENT_EXPORT Config {
|
| - Config();
|
| -
|
| - // Determines the bounds of the (square) touchmove slop suppression region.
|
| - // Defaults to 0 (disabled).
|
| - double touchmove_slop_suppression_length_dips;
|
| -
|
| - // Determines the type of touch scrolling.
|
| - // Defaults to TouchEventQueue:::TOUCH_SCROLLING_MODE_DEFAULT.
|
| - TouchEventQueue::TouchScrollingMode touch_scrolling_mode;
|
| -
|
| - // Controls whether touch ack timeouts will trigger touch cancellation.
|
| - // Defaults to 200ms.
|
| - base::TimeDelta touch_ack_timeout_delay;
|
| -
|
| - // Whether the platform supports touch ack timeout behavior.
|
| - // Defaults to false (disabled).
|
| - bool touch_ack_timeout_supported;
|
| - };
|
| -
|
| - // The |client| must outlive the TouchEventQueue.
|
| - TouchEventQueue(TouchEventQueueClient* client, const Config& config);
|
| -
|
| + // The |client| must outlive the TouchEventQueue. If
|
| + // |touchmove_suppression_length_dips| <= 0, touch move suppression is
|
| + // disabled.
|
| + TouchEventQueue(TouchEventQueueClient* client,
|
| + TouchScrollingMode mode,
|
| + double touchmove_suppression_length_dips);
|
| ~TouchEventQueue();
|
|
|
| // Adds an event to the queue. The event may be coalesced with previously
|
| @@ -112,7 +95,7 @@
|
| // Sets whether a delayed touch ack will cancel and flush the current
|
| // touch sequence. Note that, if the timeout was previously disabled, enabling
|
| // it will take effect only for the following touch sequence.
|
| - void SetAckTimeoutEnabled(bool enabled);
|
| + void SetAckTimeoutEnabled(bool enabled, base::TimeDelta ack_timeout_delay);
|
|
|
| bool empty() const WARN_UNUSED_RESULT {
|
| return touch_queue_.empty();
|
| @@ -217,7 +200,7 @@
|
| };
|
| TouchFilteringState touch_filtering_state_;
|
|
|
| - // Optional handler for timed-out touch event acks.
|
| + // Optional handler for timed-out touch event acks, disabled by default.
|
| bool ack_timeout_enabled_;
|
| scoped_ptr<TouchTimeoutHandler> timeout_handler_;
|
|
|
| @@ -227,12 +210,12 @@
|
|
|
| // Whether touch events should remain buffered and dispatched asynchronously
|
| // while a scroll sequence is active. In this mode, touchmove's are throttled
|
| - // and ack'ed immediately, but remain buffered in |pending_async_touchmove_|
|
| + // and ack'ed immediately, but remain buffered in |pending_async_touch_move_|
|
| // until a sufficient time period has elapsed since the last sent touch event.
|
| // For details see the design doc at http://goo.gl/lVyJAa.
|
| bool send_touch_events_async_;
|
| - bool needs_async_touchmove_for_outer_slop_region_;
|
| - scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_;
|
| + bool needs_async_touch_move_for_outer_slop_region_;
|
| + scoped_ptr<TouchEventWithLatencyInfo> pending_async_touch_move_;
|
| double last_sent_touch_timestamp_sec_;
|
|
|
| // How touch events are handled during scrolling. For now this is a global
|
|
|