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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.h

Issue 23856016: Send touch cancel to renderer when scrolling starts (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: always insert the touch cancel at the beginning of TEQ 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/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 d1f4a6180bfdd3049f32e8ba9a8ddb3c851cb5cc..42c0ffb917428a9134d21af9f0f7a2ccb49298ea 100644
--- a/content/browser/renderer_host/input/touch_event_queue.h
+++ b/content/browser/renderer_host/input/touch_event_queue.h
@@ -52,6 +52,12 @@ class TouchEventQueue {
void ProcessTouchAck(InputEventAckState ack_result,
const ui::LatencyInfo& latency_info);
+ // When GestureScrollBegin is received, we send a touch cancel to renderer,
+ // route all the following touch events directly to client, and ignore the
+ // ack for the touch cancel. When GestureScrollEnd/GestureFlingStart is
+ // received, we resume the normal flow of sending touch events to renderer.
+ void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event);
+
// Empties the queue of touch events. This may result in any number of gesture
// events being sent to the renderer.
void FlushQueue();
@@ -61,10 +67,6 @@ class TouchEventQueue {
return touch_queue_.empty();
}
- void set_no_touch_move_to_renderer(bool value) {
- no_touch_move_to_renderer_ = value;
- }
-
private:
friend class MockRenderWidgetHost;
friend class ImmediateInputRouterTest;
@@ -95,12 +97,14 @@ class TouchEventQueue {
TouchPointAckStates touch_ack_states_;
// Used to defer touch forwarding when ack dispatch triggers |QueueEvent()|.
- bool dispatching_touch_ack_;
-
- // Don't send touch move events to renderer. This is enabled when the page
- // is scrolling. This behaviour is currently enabled only on aura behind a
- // flag.
- bool no_touch_move_to_renderer_;
+ // If not NULL, |dispatching_touch_ack_| is the touch event of which the ack
+ // is being dispatched.
+ CoalescedWebTouchEvent* dispatching_touch_ack_;
+
+ // Don't send touch events to renderer. This is enabled when the page
+ // is scrolling. This behaviour is currently enabled only on aura behind
+ // a flag.
+ bool no_touch_to_renderer_;
DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
};

Powered by Google App Engine
This is Rietveld 408576698