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

Side by Side Diff: content/browser/renderer_host/input/gesture_event_queue.h

Issue 628763003: Support InputRouter recycling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // Sets the state of the |fling_in_progress_| field to indicate that a fling 97 // Sets the state of the |fling_in_progress_| field to indicate that a fling
98 // is definitely not in progress. 98 // is definitely not in progress.
99 void FlingHasBeenHalted(); 99 void FlingHasBeenHalted();
100 100
101 // Returns the |TouchpadTapSuppressionController| instance. 101 // Returns the |TouchpadTapSuppressionController| instance.
102 TouchpadTapSuppressionController* GetTouchpadTapSuppressionController(); 102 TouchpadTapSuppressionController* GetTouchpadTapSuppressionController();
103 103
104 void ForwardGestureEvent(const GestureEventWithLatencyInfo& gesture_event); 104 void ForwardGestureEvent(const GestureEventWithLatencyInfo& gesture_event);
105 105
106 // Reset the state of the queue, dropping all pending gestures and preparing
107 // for an entirely new event stream.
108 void Recycle();
109
106 // Whether the queue is expecting a gesture event ack. 110 // Whether the queue is expecting a gesture event ack.
107 bool ExpectingGestureAck() const; 111 bool ExpectingGestureAck() const;
108 112
109 bool empty() const { 113 bool empty() const {
110 return coalesced_gesture_events_.empty() && 114 return coalesced_gesture_events_.empty() &&
111 debouncing_deferral_queue_.empty(); 115 debouncing_deferral_queue_.empty();
112 } 116 }
113 117
114 void set_debounce_interval_time_ms_for_testing(int interval_ms) { 118 void set_debounce_interval_time_ms_for_testing(int interval_ms) {
115 debounce_interval_ = base::TimeDelta::FromMilliseconds(interval_ms); 119 debounce_interval_ = base::TimeDelta::FromMilliseconds(interval_ms);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Time window in which to debounce scroll/fling ends. Note that an interval 225 // Time window in which to debounce scroll/fling ends. Note that an interval
222 // of zero effectively disables debouncing. 226 // of zero effectively disables debouncing.
223 base::TimeDelta debounce_interval_; 227 base::TimeDelta debounce_interval_;
224 228
225 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); 229 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue);
226 }; 230 };
227 231
228 } // namespace content 232 } // namespace content
229 233
230 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ 234 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698