| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 InputEventAckState ack_result); | 86 InputEventAckState ack_result); |
| 87 | 87 |
| 88 // Notifies the queue whether the renderer has at least one touch handler. | 88 // Notifies the queue whether the renderer has at least one touch handler. |
| 89 void OnHasTouchEventHandlers(bool has_handlers); | 89 void OnHasTouchEventHandlers(bool has_handlers); |
| 90 | 90 |
| 91 // Returns whether the currently pending touch event (waiting ACK) is for | 91 // Returns whether the currently pending touch event (waiting ACK) is for |
| 92 // a touch start event. | 92 // a touch start event. |
| 93 bool IsPendingAckTouchStart() const; | 93 bool IsPendingAckTouchStart() const; |
| 94 | 94 |
| 95 // Sets whether a delayed touch ack will cancel and flush the current | 95 // Sets whether a delayed touch ack will cancel and flush the current |
| 96 // touch sequence. | 96 // touch sequence. Note that, if the timeout was previously disabled, enabling |
| 97 // it will take effect only for the following touch sequence. |
| 97 void SetAckTimeoutEnabled(bool enabled, size_t ack_timeout_delay_ms); | 98 void SetAckTimeoutEnabled(bool enabled, size_t ack_timeout_delay_ms); |
| 98 | 99 |
| 99 bool empty() const WARN_UNUSED_RESULT { | 100 bool empty() const WARN_UNUSED_RESULT { |
| 100 return touch_queue_.empty(); | 101 return touch_queue_.empty(); |
| 101 } | 102 } |
| 102 | 103 |
| 103 size_t size() const { | 104 size_t size() const { |
| 104 return touch_queue_.size(); | 105 return touch_queue_.size(); |
| 105 } | 106 } |
| 106 | 107 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // setting for experimentation, but we may evolve it into an app-controlled | 198 // setting for experimentation, but we may evolve it into an app-controlled |
| 198 // mode. | 199 // mode. |
| 199 const TouchScrollingMode touch_scrolling_mode_; | 200 const TouchScrollingMode touch_scrolling_mode_; |
| 200 | 201 |
| 201 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 202 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 202 }; | 203 }; |
| 203 | 204 |
| 204 } // namespace content | 205 } // namespace content |
| 205 | 206 |
| 206 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 207 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |