Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 // http://crbug.com/148443. | 61 // http://crbug.com/148443. |
| 62 class CONTENT_EXPORT GestureEventQueue { | 62 class CONTENT_EXPORT GestureEventQueue { |
| 63 public: | 63 public: |
| 64 // Both |client| and |touchpad_client| must outlive the GestureEventQueue. | 64 // Both |client| and |touchpad_client| must outlive the GestureEventQueue. |
| 65 GestureEventQueue(GestureEventQueueClient* client, | 65 GestureEventQueue(GestureEventQueueClient* client, |
| 66 TouchpadTapSuppressionControllerClient* touchpad_client); | 66 TouchpadTapSuppressionControllerClient* touchpad_client); |
| 67 ~GestureEventQueue(); | 67 ~GestureEventQueue(); |
| 68 | 68 |
| 69 // Returns |true| if the caller should immediately forward the provided | 69 // Returns |true| if the caller should immediately forward the provided |
| 70 // |GestureEventWithLatencyInfo| argument to the renderer. | 70 // |GestureEventWithLatencyInfo| argument to the renderer. |
| 71 // If this function returns false, then the event may be queued and forwared | |
| 72 // at a later point. | |
| 71 bool ShouldForward(const GestureEventWithLatencyInfo&); | 73 bool ShouldForward(const GestureEventWithLatencyInfo&); |
|
jdduke (slow)
2014/03/26 23:13:43
I've had a refactoring patch, for the longest time
Rick Byers
2014/03/27 01:44:09
Yeah, I get confused by this every time and have t
| |
| 72 | 74 |
| 73 // Indicates that the caller has received an acknowledgement from the renderer | 75 // Indicates that the caller has received an acknowledgement from the renderer |
| 74 // with state |ack_result| and event |type|. May send events if the queue is | 76 // with state |ack_result| and event |type|. May send events if the queue is |
| 75 // not empty. | 77 // not empty. |
| 76 void ProcessGestureAck(InputEventAckState ack_result, | 78 void ProcessGestureAck(InputEventAckState ack_result, |
| 77 blink::WebInputEvent::Type type, | 79 blink::WebInputEvent::Type type, |
| 78 const ui::LatencyInfo& latency); | 80 const ui::LatencyInfo& latency); |
| 79 | 81 |
| 80 // Sets the state of the |fling_in_progress_| field to indicate that a fling | 82 // Sets the state of the |fling_in_progress_| field to indicate that a fling |
| 81 // is definitely not in progress. | 83 // is definitely not in progress. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 // Whether scroll-ending events should be deferred when a scroll is active. | 219 // Whether scroll-ending events should be deferred when a scroll is active. |
| 218 // Defaults to true. | 220 // Defaults to true. |
| 219 bool debounce_enabled_; | 221 bool debounce_enabled_; |
| 220 | 222 |
| 221 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); | 223 DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); |
| 222 }; | 224 }; |
| 223 | 225 |
| 224 } // namespace content | 226 } // namespace content |
| 225 | 227 |
| 226 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ | 228 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_ |
| OLD | NEW |