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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 106 |
107 bool empty() const { | 107 bool empty() const { |
108 return coalesced_gesture_events_.empty() && | 108 return coalesced_gesture_events_.empty() && |
109 debouncing_deferral_queue_.empty(); | 109 debouncing_deferral_queue_.empty(); |
110 } | 110 } |
111 | 111 |
112 void set_debounce_interval_time_ms_for_testing(int interval_ms) { | 112 void set_debounce_interval_time_ms_for_testing(int interval_ms) { |
113 debounce_interval_ = base::TimeDelta::FromMilliseconds(interval_ms); | 113 debounce_interval_ = base::TimeDelta::FromMilliseconds(interval_ms); |
114 } | 114 } |
115 | 115 |
116 bool FlingInProgress() { return fling_in_progress_; } | |
dtapuska
2016/04/27 19:05:13
const
| |
117 | |
116 private: | 118 private: |
117 friend class GestureEventQueueTest; | 119 friend class GestureEventQueueTest; |
118 friend class MockRenderWidgetHost; | 120 friend class MockRenderWidgetHost; |
119 | 121 |
120 // TODO(mohsen): There are a bunch of ShouldForward.../ShouldDiscard... | 122 // TODO(mohsen): There are a bunch of ShouldForward.../ShouldDiscard... |
121 // methods that are getting confusing. This should be somehow fixed. Maybe | 123 // methods that are getting confusing. This should be somehow fixed. Maybe |
122 // while refactoring GEQ: http://crbug.com/148443. | 124 // while refactoring GEQ: http://crbug.com/148443. |
123 | 125 |
124 // Inovked on the expiration of the debounce interval to release | 126 // Inovked on the expiration of the debounce interval to release |
125 // deferred events. | 127 // deferred events. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 // Time window in which to debounce scroll/fling ends. Note that an interval | 204 // Time window in which to debounce scroll/fling ends. Note that an interval |
203 // of zero effectively disables debouncing. | 205 // of zero effectively disables debouncing. |
204 base::TimeDelta debounce_interval_; | 206 base::TimeDelta debounce_interval_; |
205 | 207 |
206 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); | 208 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); |
207 }; | 209 }; |
208 | 210 |
209 } // namespace content | 211 } // namespace content |
210 | 212 |
211 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ | 213 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ |
OLD | NEW |