| 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 10 matching lines...) Expand all Loading... |
| 21 // Interface with which TouchEventQueue can forward touch events, and dispatch | 21 // Interface with which TouchEventQueue can forward touch events, and dispatch |
| 22 // touch event responses. | 22 // touch event responses. |
| 23 class CONTENT_EXPORT TouchEventQueueClient { | 23 class CONTENT_EXPORT TouchEventQueueClient { |
| 24 public: | 24 public: |
| 25 virtual ~TouchEventQueueClient() {} | 25 virtual ~TouchEventQueueClient() {} |
| 26 | 26 |
| 27 virtual void SendTouchEventImmediately( | 27 virtual void SendTouchEventImmediately( |
| 28 const TouchEventWithLatencyInfo& event) = 0; | 28 const TouchEventWithLatencyInfo& event) = 0; |
| 29 | 29 |
| 30 virtual void OnTouchEventAck( | 30 virtual void OnTouchEventAck( |
| 31 const TouchEventWithLatencyInfo& event, | 31 const WebKit::WebTouchEvent& event, |
| 32 InputEventAckState ack_result) = 0; | 32 InputEventAckState ack_result, |
| 33 ui::LatencyInfo* latency) = 0; |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 // A queue for throttling and coalescing touch-events. | 36 // A queue for throttling and coalescing touch-events. |
| 36 class CONTENT_EXPORT TouchEventQueue { | 37 class CONTENT_EXPORT TouchEventQueue { |
| 37 public: | 38 public: |
| 38 | 39 |
| 39 // The |client| must outlive the TouchEventQueue. | 40 // The |client| must outlive the TouchEventQueue. |
| 40 explicit TouchEventQueue(TouchEventQueueClient* client); | 41 explicit TouchEventQueue(TouchEventQueueClient* client); |
| 41 virtual ~TouchEventQueue(); | 42 virtual ~TouchEventQueue(); |
| 42 | 43 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // is scrolling. This behaviour is currently enabled only on aura behind a | 104 // is scrolling. This behaviour is currently enabled only on aura behind a |
| 104 // flag. | 105 // flag. |
| 105 bool no_touch_move_to_renderer_; | 106 bool no_touch_move_to_renderer_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); | 108 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace content | 111 } // namespace content |
| 111 | 112 |
| 112 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ | 113 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ |
| OLD | NEW |