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

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

Issue 24312009: Properly forward queued touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test 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
« no previous file with comments | « content/browser/renderer_host/input/touch_event_queue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index e22c05d0f80ff504cdbcdd8408c55dd3b030bb06..9d0394ef162d034a0f43ebe90cb34969011867de 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -108,11 +108,7 @@ void TouchEventQueue::QueueEvent(const TouchEventWithLatencyInfo& event) {
// There is no touch event in the queue. Forward it to the renderer
// immediately.
touch_queue_.push_back(new CoalescedWebTouchEvent(event));
- if (ShouldForwardToRenderer(event.event))
- client_->SendTouchEventImmediately(event);
- else
- PopTouchEventToClient(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS,
- ui::LatencyInfo());
+ TryForwardNextEventToRenderer();
return;
}
@@ -153,7 +149,10 @@ void TouchEventQueue::ProcessTouchAck(InputEventAckState ack_result,
}
PopTouchEventToClient(ack_result, latency_info);
+ TryForwardNextEventToRenderer();
+}
+void TouchEventQueue::TryForwardNextEventToRenderer() {
// If there are queued touch events, then try to forward them to the renderer
// immediately, or ACK the events back to the client if appropriate.
while (!touch_queue_.empty()) {
« no previous file with comments | « content/browser/renderer_host/input/touch_event_queue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698