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

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

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, fixed input_router_imp_unittest Created 4 years, 9 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 8a19586c618845acb6440c48b2dd0f2409e07e19..b5f6b458d5a72477a73ec82cb5fa99273acf05af 100644
--- a/content/browser/renderer_host/input/touch_event_queue.h
+++ b/content/browser/renderer_host/input/touch_event_queue.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <deque>
+#include <list>
#include <map>
#include "base/macros.h"
@@ -70,6 +71,9 @@ class CONTENT_EXPORT TouchEventQueue {
// the renderer (e.g. when there are no other queued touch event).
void QueueEvent(const TouchEventWithLatencyInfo& event);
+ // Adds a TouchScrollStarted event to the front of the queue.
tdresser 2016/03/30 19:19:01 This comment is a bit misleading, as it's often pl
mustaq 2016/03/30 20:21:05 It is better? Or you want to see something like "1
+ void PrependTouchScrollNotification();
+
// Notifies the queue that a touch-event has been processed by the renderer.
// At this point, if the ack is for async touchmove, remove the uncancelable
// touchmove from the front of the queue and decide if it should dispatch the
@@ -109,8 +113,6 @@ class CONTENT_EXPORT TouchEventQueue {
// Whether ack timeout behavior is supported and enabled for the current site.
bool IsAckTimeoutEnabled() const;
- bool IsForwardingTouches();
-
bool empty() const WARN_UNUSED_RESULT {
return touch_queue_.empty();
}
@@ -155,15 +157,12 @@ class CONTENT_EXPORT TouchEventQueue {
void PopTouchEventToClient(InputEventAckState ack_result,
const ui::LatencyInfo& renderer_latency_info);
- // Ack all coalesced events in |acked_event| to the client with |ack_result|,
- // updating the acked events with |optional_latency_info| if it exists.
+ // Ack all coalesced events at the head of the queue to the client with
+ // |ack_result|, updating the acked events with |optional_latency_info| if it
+ // exists, and popping the head of the queue.
void AckTouchEventToClient(InputEventAckState ack_result,
- scoped_ptr<CoalescedWebTouchEvent> acked_event,
const ui::LatencyInfo* optional_latency_info);
- // Safely pop the head of the queue.
- scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent();
-
// Dispatch |touch| to the client. Before dispatching, updates pointer
// states in touchmove events for pointers that have not changed position.
void SendTouchEventImmediately(TouchEventWithLatencyInfo* touch);
@@ -184,7 +183,7 @@ class CONTENT_EXPORT TouchEventQueue {
// Handles touch event forwarding and ack'ed event dispatch.
TouchEventQueueClient* client_;
- typedef std::deque<CoalescedWebTouchEvent*> TouchQueue;
+ typedef std::list<CoalescedWebTouchEvent*> TouchQueue;
TouchQueue touch_queue_;
// Position of the first touch in the most recent sequence forwarded to the

Powered by Google App Engine
This is Rietveld 408576698