| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ACK_WITH_NO_CONSUMER_EXISTS, | 157 ACK_WITH_NO_CONSUMER_EXISTS, |
| 158 ACK_WITH_NOT_CONSUMED, | 158 ACK_WITH_NOT_CONSUMED, |
| 159 FORWARD_TO_RENDERER, | 159 FORWARD_TO_RENDERER, |
| 160 }; | 160 }; |
| 161 // Filter touches prior to forwarding to the renderer, e.g., if the renderer | 161 // Filter touches prior to forwarding to the renderer, e.g., if the renderer |
| 162 // has no touch handler. | 162 // has no touch handler. |
| 163 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event); | 163 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event); |
| 164 void ForwardToRenderer(const TouchEventWithLatencyInfo& event); | 164 void ForwardToRenderer(const TouchEventWithLatencyInfo& event); |
| 165 void UpdateTouchAckStates(const blink::WebTouchEvent& event, | 165 void UpdateTouchAckStates(const blink::WebTouchEvent& event, |
| 166 InputEventAckState ack_result); | 166 InputEventAckState ack_result); |
| 167 bool AllTouchAckStatesHaveState(InputEventAckState ack_state) const; |
| 167 | 168 |
| 168 | 169 |
| 169 // Handles touch event forwarding and ack'ed event dispatch. | 170 // Handles touch event forwarding and ack'ed event dispatch. |
| 170 TouchEventQueueClient* client_; | 171 TouchEventQueueClient* client_; |
| 171 | 172 |
| 172 typedef std::deque<CoalescedWebTouchEvent*> TouchQueue; | 173 typedef std::deque<CoalescedWebTouchEvent*> TouchQueue; |
| 173 TouchQueue touch_queue_; | 174 TouchQueue touch_queue_; |
| 174 | 175 |
| 175 // Maintain the ACK status for each touch point. | 176 // Maintain the ACK status for each touch point. |
| 176 typedef std::map<int, InputEventAckState> TouchPointAckStates; | 177 typedef std::map<int, InputEventAckState> TouchPointAckStates; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // setting for experimentation, but we may evolve it into an app-controlled | 222 // setting for experimentation, but we may evolve it into an app-controlled |
| 222 // mode. | 223 // mode. |
| 223 const TouchScrollingMode touch_scrolling_mode_; | 224 const TouchScrollingMode touch_scrolling_mode_; |
| 224 | 225 |
| 225 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 226 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 } // namespace content | 229 } // namespace content |
| 229 | 230 |
| 230 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 231 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |