Chromium Code Reviews| 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 the currently pending touch event ACK is for a touch start. | |
|
sadrul
2013/11/20 23:28:30
*Returns
Rick Byers
2013/11/21 02:37:36
Done.
| |
| 66 bool IsPendingAckTouchStart() const; | |
| 67 | |
| 65 // Returns whether the event-queue is empty. | 68 // Returns whether the event-queue is empty. |
| 66 bool empty() const WARN_UNUSED_RESULT { | 69 bool empty() const WARN_UNUSED_RESULT { |
| 67 return touch_queue_.empty(); | 70 return touch_queue_.empty(); |
| 68 } | 71 } |
| 69 | 72 |
| 70 bool no_touch_to_renderer() const { | 73 bool no_touch_to_renderer() const { |
| 71 return no_touch_to_renderer_; | 74 return no_touch_to_renderer_; |
| 72 } | 75 } |
| 73 | 76 |
| 74 private: | 77 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 | 111 // is scrolling. This behaviour is currently enabled only on aura behind |
| 109 // a flag. | 112 // a flag. |
| 110 bool no_touch_to_renderer_; | 113 bool no_touch_to_renderer_; |
| 111 | 114 |
| 112 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 115 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace content | 118 } // namespace content |
| 116 | 119 |
| 117 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 120 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |