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

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

Issue 25268002: Make tapDown async. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke's comments. 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 | « no previous file | content/browser/renderer_host/input/gesture_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/gesture_event_filter.h
diff --git a/content/browser/renderer_host/input/gesture_event_filter.h b/content/browser/renderer_host/input/gesture_event_filter.h
index b0c378222eaa1d19ab320500a7c9f62231cd4323..1db6d57a27fc7ec872101926e2c5af69e0848f73 100644
--- a/content/browser/renderer_host/input/gesture_event_filter.h
+++ b/content/browser/renderer_host/input/gesture_event_filter.h
@@ -54,7 +54,7 @@ class GestureEventFilter {
// Indicates that the caller has received an acknowledgement from the renderer
// with state |processed| and event |type|. May send events if the queue is
// not empty.
- void ProcessGestureAck(bool processed, int type);
+ void ProcessGestureAck(bool processed, WebKit::WebInputEvent::Type type);
// Sets the state of the |fling_in_progress_| field to indicate that a fling
// is definitely not in progress.
@@ -77,6 +77,8 @@ class GestureEventFilter {
void ForwardGestureEventSkipDeferral(
const GestureEventWithLatencyInfo& gesture_event);
+ static bool IsGestureEventTypeAsync(WebKit::WebInputEvent::Type type);
+
private:
friend class MockRenderWidgetHost;
friend class ImmediateInputRouterTest;
@@ -146,6 +148,10 @@ class GestureEventFilter {
gfx::Transform GetTransformForEvent(
const GestureEventWithLatencyInfo& gesture_event) const;
+ // Pops and sends async events from the head of |coalesced_gesture_events_|
+ // until the queue is empty or the event at the head is synchronous.
+ void SendAsyncEvents();
+
// The receiver of all forwarded gesture events.
InputRouter* input_router_;
@@ -183,7 +189,12 @@ class GestureEventFilter {
typedef std::deque<GestureEventWithLatencyInfo> GestureEventQueue;
- // Queue of coalesced gesture events not yet sent to the renderer.
+ // Queue of coalesced gesture events not yet sent to the renderer. If
+ // |ignore_next_ack_| is false, then the event at the front of the queue has
+ // been sent and is awaiting an ACK, and all other events have yet to be sent.
+ // If |ignore_next_ack_| is true, then the two events at the front of the
+ // queue have been sent, and the second is awaiting an ACK. All other events
+ // have yet to be sent.
GestureEventQueue coalesced_gesture_events_;
// Tap gesture event currently subject to deferral.
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698