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

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: 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 358fae9c50d8d50f4cf227992c4c0c07341ca09d..0d8dd758e7927883515f538015b7c4066efab099 100644
--- a/content/browser/renderer_host/input/touch_event_queue.h
+++ b/content/browser/renderer_host/input/touch_event_queue.h
@@ -52,6 +52,8 @@ class TouchEventQueue {
void ProcessTouchAck(InputEventAckState ack_result,
const ui::LatencyInfo& latency_info);
+ 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 +63,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;
@@ -92,10 +90,17 @@ class TouchEventQueue {
// 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_;
+ // 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_;
+
+ // Latest event that is queued.
+ TouchEventWithLatencyInfo latest_event_;
sadrul 2013/09/23 16:17:33 Why do you need this?
+
+ // When scroll begins, we send the |synthesized_cancel_event_| to renderer
+ // and when it is acked back we drop it before forwarding it to view.
+ CoalescedWebTouchEvent* synthesized_cancel_event_;
sadrul 2013/09/23 16:17:33 We shouldn't hold onto a raw pointer like this. Ad
DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
};

Powered by Google App Engine
This is Rietveld 408576698