| 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 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "content/browser/renderer_host/input/timeout_monitor.h" | 9 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 10 #include "content/browser/renderer_host/input/touch_event_queue.h" | 10 #include "content/browser/renderer_host/input/touch_event_queue.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 void SendGestureEvent(WebInputEvent::Type type) { | 110 void SendGestureEvent(WebInputEvent::Type type) { |
| 111 WebGestureEvent event; | 111 WebGestureEvent event; |
| 112 event.type = type; | 112 event.type = type; |
| 113 queue_->OnGestureScrollEvent( | 113 queue_->OnGestureScrollEvent( |
| 114 GestureEventWithLatencyInfo(event, ui::LatencyInfo())); | 114 GestureEventWithLatencyInfo(event, ui::LatencyInfo())); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void SendTouchEventAck(InputEventAckState ack_result) { | 117 void SendTouchEventAck(InputEventAckState ack_result) { |
| 118 queue_->ProcessTouchAck(ack_result, ui::LatencyInfo()); | 118 queue_->ProcessTouchAck(ack_result, ui::LatencyInfo(), |
| 119 touch_event_.uniqueTouchEventId); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void SendGestureEventAck(WebInputEvent::Type type, | 122 void SendGestureEventAck(WebInputEvent::Type type, |
| 122 InputEventAckState ack_result) { | 123 InputEventAckState ack_result) { |
| 123 blink::WebGestureEvent gesture_event; | 124 blink::WebGestureEvent gesture_event; |
| 124 gesture_event.type = type; | 125 gesture_event.type = type; |
| 125 GestureEventWithLatencyInfo event(gesture_event, ui::LatencyInfo()); | 126 GestureEventWithLatencyInfo event(gesture_event, ui::LatencyInfo()); |
| 126 queue_->OnGestureEventAck(event, ack_result); | 127 queue_->OnGestureEventAck(event, ack_result); |
| 127 } | 128 } |
| 128 | 129 |
| (...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 EXPECT_EQ(1U, GetAndResetAckedEventCount()); | 2253 EXPECT_EQ(1U, GetAndResetAckedEventCount()); |
| 2253 | 2254 |
| 2254 // TouchMove should be allowed and test for touches state. | 2255 // TouchMove should be allowed and test for touches state. |
| 2255 const WebTouchEvent& event2 = sent_event(); | 2256 const WebTouchEvent& event2 = sent_event(); |
| 2256 EXPECT_EQ(WebInputEvent::TouchMove, event2.type); | 2257 EXPECT_EQ(WebInputEvent::TouchMove, event2.type); |
| 2257 EXPECT_EQ(WebTouchPoint::StateStationary, event2.touches[0].state); | 2258 EXPECT_EQ(WebTouchPoint::StateStationary, event2.touches[0].state); |
| 2258 EXPECT_EQ(WebTouchPoint::StateMoved, event2.touches[1].state); | 2259 EXPECT_EQ(WebTouchPoint::StateMoved, event2.touches[1].state); |
| 2259 } | 2260 } |
| 2260 | 2261 |
| 2261 } // namespace content | 2262 } // namespace content |
| OLD | NEW |