| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void ForwardNextEventToRenderer(); | 153 void ForwardNextEventToRenderer(); |
| 154 | 154 |
| 155 // Pops the touch-event from the head of the queue and acks it to the client. | 155 // Pops the touch-event from the head of the queue and acks it to the client. |
| 156 void PopTouchEventToClient(InputEventAckState ack_result); | 156 void PopTouchEventToClient(InputEventAckState ack_result); |
| 157 | 157 |
| 158 // Pops the touch-event from the top of the queue and acks it to the client, | 158 // Pops the touch-event from the top of the queue and acks it to the client, |
| 159 // updating the event with |renderer_latency_info|. | 159 // updating the event with |renderer_latency_info|. |
| 160 void PopTouchEventToClient(InputEventAckState ack_result, | 160 void PopTouchEventToClient(InputEventAckState ack_result, |
| 161 const ui::LatencyInfo& renderer_latency_info); | 161 const ui::LatencyInfo& renderer_latency_info); |
| 162 | 162 |
| 163 // Ack all coalesced events in |acked_event| to the client with |ack_result|. | 163 // Ack all coalesced events in |acked_event| to the client with |ack_result|, |
| 164 // updating the acked events with |optional_latency_info| if it exists. |
| 164 void AckTouchEventToClient(InputEventAckState ack_result, | 165 void AckTouchEventToClient(InputEventAckState ack_result, |
| 165 scoped_ptr<CoalescedWebTouchEvent> acked_event); | 166 scoped_ptr<CoalescedWebTouchEvent> acked_event, |
| 167 const ui::LatencyInfo* optional_latency_info); |
| 166 | 168 |
| 167 // Safely pop the head of the queue. | 169 // Safely pop the head of the queue. |
| 168 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent(); | 170 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent(); |
| 169 | 171 |
| 170 // Dispatch |touch| to the client. | 172 // Dispatch |touch| to the client. |
| 171 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch); | 173 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch); |
| 172 | 174 |
| 173 enum PreFilterResult { | 175 enum PreFilterResult { |
| 174 ACK_WITH_NO_CONSUMER_EXISTS, | 176 ACK_WITH_NO_CONSUMER_EXISTS, |
| 175 ACK_WITH_NOT_CONSUMED, | 177 ACK_WITH_NOT_CONSUMED, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // setting for experimentation, but we may evolve it into an app-controlled | 241 // setting for experimentation, but we may evolve it into an app-controlled |
| 240 // mode. | 242 // mode. |
| 241 const TouchScrollingMode touch_scrolling_mode_; | 243 const TouchScrollingMode touch_scrolling_mode_; |
| 242 | 244 |
| 243 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 245 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 244 }; | 246 }; |
| 245 | 247 |
| 246 } // namespace content | 248 } // namespace content |
| 247 | 249 |
| 248 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 250 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |