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_LEGACY_TOUCH_EVENT_QUEUE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_LEGACY_TOUCH_EVENT_QUEUE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_LEGACY_TOUCH_EVENT_QUEUE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_LEGACY_TOUCH_EVENT_QUEUE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 size_t size() const { return touch_queue_.size(); } | 90 size_t size() const { return touch_queue_.size(); } |
91 | 91 |
92 bool has_handlers() const { return has_handlers_; } | 92 bool has_handlers() const { return has_handlers_; } |
93 | 93 |
94 size_t uncancelable_touch_moves_pending_ack_count() const { | 94 size_t uncancelable_touch_moves_pending_ack_count() const { |
95 return ack_pending_async_touchmove_ids_.size(); | 95 return ack_pending_async_touchmove_ids_.size(); |
96 } | 96 } |
97 | 97 |
98 private: | 98 private: |
99 friend class TouchEventQueueTest; | 99 friend class LegacyTouchEventQueueTest; |
100 | 100 |
101 bool HasPendingAsyncTouchMoveForTesting() const; | 101 bool HasPendingAsyncTouchMoveForTesting() const; |
102 bool IsTimeoutRunningForTesting() const; | 102 bool IsTimeoutRunningForTesting() const; |
103 const TouchEventWithLatencyInfo& GetLatestEventForTesting() const; | 103 const TouchEventWithLatencyInfo& GetLatestEventForTesting() const; |
104 | 104 |
105 // Empties the queue of touch events. This may result in any number of gesture | 105 // Empties the queue of touch events. This may result in any number of gesture |
106 // events being sent to the renderer. | 106 // events being sent to the renderer. |
107 void FlushQueue() override; | 107 void FlushQueue() override; |
108 | 108 |
109 // Walks the queue, checking each event with |FilterBeforeForwarding()|. | 109 // Walks the queue, checking each event with |FilterBeforeForwarding()|. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // Event is saved to compare pointer positions for new touchmove events. | 202 // Event is saved to compare pointer positions for new touchmove events. |
203 std::unique_ptr<blink::WebTouchEvent> last_sent_touchevent_; | 203 std::unique_ptr<blink::WebTouchEvent> last_sent_touchevent_; |
204 | 204 |
205 DISALLOW_COPY_AND_ASSIGN(LegacyTouchEventQueue); | 205 DISALLOW_COPY_AND_ASSIGN(LegacyTouchEventQueue); |
206 }; | 206 }; |
207 | 207 |
208 } // namespace content | 208 } // namespace content |
209 | 209 |
210 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_LEGACY_TOUCH_EVENT_QUEUE_H_ | 210 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_LEGACY_TOUCH_EVENT_QUEUE_H_ |
OLD | NEW |