OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOUCH_EVENT_QUEUE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Adds an event to the queue. The event may be coalesced with previously | 57 // Adds an event to the queue. The event may be coalesced with previously |
58 // queued events (e.g. consecutive touch-move events can be coalesced into a | 58 // queued events (e.g. consecutive touch-move events can be coalesced into a |
59 // single touch-move event). The event may also be immediately forwarded to | 59 // single touch-move event). The event may also be immediately forwarded to |
60 // the renderer (e.g. when there are no other queued touch event). | 60 // the renderer (e.g. when there are no other queued touch event). |
61 void QueueEvent(const TouchEventWithLatencyInfo& event); | 61 void QueueEvent(const TouchEventWithLatencyInfo& event); |
62 | 62 |
63 // Notifies the queue that a touch-event has been processed by the renderer. | 63 // Notifies the queue that a touch-event has been processed by the renderer. |
64 // At this point, the queue may send one or more gesture events and/or | 64 // At this point, the queue may send one or more gesture events and/or |
65 // additional queued touch-events to the renderer. | 65 // additional queued touch-events to the renderer. |
66 void ProcessTouchAck(InputEventAckState ack_result, | 66 void ProcessTouchAck(InputEventAckState ack_result, |
67 const ui::LatencyInfo& latency_info); | 67 const ui::LatencyInfo& latency_info, |
| 68 uint64 unique_touch_event_id); |
68 | 69 |
69 // When GestureScrollBegin is received, we send a touch cancel to renderer, | 70 // When GestureScrollBegin is received, we send a touch cancel to renderer, |
70 // route all the following touch events directly to client, and ignore the | 71 // route all the following touch events directly to client, and ignore the |
71 // ack for the touch cancel. When Gesture{ScrollEnd,FlingStart} is received, | 72 // ack for the touch cancel. When Gesture{ScrollEnd,FlingStart} is received, |
72 // resume the normal flow of sending touch events to the renderer. | 73 // resume the normal flow of sending touch events to the renderer. |
73 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event); | 74 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event); |
74 | 75 |
75 void OnGestureEventAck( | 76 void OnGestureEventAck( |
76 const GestureEventWithLatencyInfo& event, | 77 const GestureEventWithLatencyInfo& event, |
77 InputEventAckState ack_result); | 78 InputEventAckState ack_result); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 207 |
207 // Event is saved to compare pointer positions for new touchmove events. | 208 // Event is saved to compare pointer positions for new touchmove events. |
208 scoped_ptr<blink::WebTouchEvent> last_sent_touchevent_; | 209 scoped_ptr<blink::WebTouchEvent> last_sent_touchevent_; |
209 | 210 |
210 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 211 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
211 }; | 212 }; |
212 | 213 |
213 } // namespace content | 214 } // namespace content |
214 | 215 |
215 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 216 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
OLD | NEW |