OLD | NEW |
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 // Queue of coalesced gesture events not yet sent to the renderer. If | 186 // Queue of coalesced gesture events not yet sent to the renderer. If |
187 // |ignore_next_ack_| is false, then the event at the front of the queue has | 187 // |ignore_next_ack_| is false, then the event at the front of the queue has |
188 // been sent and is awaiting an ACK, and all other events have yet to be sent. | 188 // been sent and is awaiting an ACK, and all other events have yet to be sent. |
189 // If |ignore_next_ack_| is true, then the two events at the front of the | 189 // If |ignore_next_ack_| is true, then the two events at the front of the |
190 // queue have been sent, and the second is awaiting an ACK. All other events | 190 // queue have been sent, and the second is awaiting an ACK. All other events |
191 // have yet to be sent. | 191 // have yet to be sent. |
192 GestureQueue coalesced_gesture_events_; | 192 GestureQueue coalesced_gesture_events_; |
193 | 193 |
194 // Timer to release a previously deferred gesture event. | 194 // Timer to release a previously deferred gesture event. |
195 base::OneShotTimer<GestureEventQueue> debounce_deferring_timer_; | 195 base::OneShotTimer debounce_deferring_timer_; |
196 | 196 |
197 // Queue of events that have been deferred for debounce. | 197 // Queue of events that have been deferred for debounce. |
198 GestureQueue debouncing_deferral_queue_; | 198 GestureQueue debouncing_deferral_queue_; |
199 | 199 |
200 // Time window in which to debounce scroll/fling ends. Note that an interval | 200 // Time window in which to debounce scroll/fling ends. Note that an interval |
201 // of zero effectively disables debouncing. | 201 // of zero effectively disables debouncing. |
202 base::TimeDelta debounce_interval_; | 202 base::TimeDelta debounce_interval_; |
203 | 203 |
204 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); | 204 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); |
205 }; | 205 }; |
206 | 206 |
207 } // namespace content | 207 } // namespace content |
208 | 208 |
209 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ | 209 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ |
OLD | NEW |