| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // When GestureScrollBegin is received, we send a touch cancel to renderer, | 55 // When GestureScrollBegin is received, we send a touch cancel to renderer, |
| 56 // route all the following touch events directly to client, and ignore the | 56 // route all the following touch events directly to client, and ignore the |
| 57 // ack for the touch cancel. When GestureScrollEnd/GestureFlingStart is | 57 // ack for the touch cancel. When GestureScrollEnd/GestureFlingStart is |
| 58 // received, we resume the normal flow of sending touch events to renderer. | 58 // received, we resume the normal flow of sending touch events to renderer. |
| 59 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event); | 59 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event); |
| 60 | 60 |
| 61 // Empties the queue of touch events. This may result in any number of gesture | 61 // Empties the queue of touch events. This may result in any number of gesture |
| 62 // events being sent to the renderer. | 62 // events being sent to the renderer. |
| 63 void FlushQueue(); | 63 void FlushQueue(); |
| 64 | 64 |
| 65 // Return whether a TouchStart event with the given ID is currently awaiting |
| 66 // an ACK. |
| 67 bool IsTouchStartPendingAck(int touch_id); |
| 68 |
| 65 // Returns whether the event-queue is empty. | 69 // Returns whether the event-queue is empty. |
| 66 bool empty() const WARN_UNUSED_RESULT { | 70 bool empty() const WARN_UNUSED_RESULT { |
| 67 return touch_queue_.empty(); | 71 return touch_queue_.empty(); |
| 68 } | 72 } |
| 69 | 73 |
| 70 bool no_touch_to_renderer() const { | 74 bool no_touch_to_renderer() const { |
| 71 return no_touch_to_renderer_; | 75 return no_touch_to_renderer_; |
| 72 } | 76 } |
| 73 | 77 |
| 74 private: | 78 private: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // is scrolling. This behaviour is currently enabled only on aura behind | 112 // is scrolling. This behaviour is currently enabled only on aura behind |
| 109 // a flag. | 113 // a flag. |
| 110 bool no_touch_to_renderer_; | 114 bool no_touch_to_renderer_; |
| 111 | 115 |
| 112 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 116 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace content | 119 } // namespace content |
| 116 | 120 |
| 117 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 121 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |