| 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 <math.h> | 5 #include <math.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void ReleaseTouchPoint(int index) { | 286 void ReleaseTouchPoint(int index) { |
| 287 touch_event_.ReleasePoint(index); | 287 touch_event_.ReleasePoint(index); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void CancelTouchPoint(int index) { | 290 void CancelTouchPoint(int index) { |
| 291 touch_event_.CancelPoint(index); | 291 touch_event_.CancelPoint(index); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void SendInputEventACK(blink::WebInputEvent::Type type, | 294 void SendInputEventACK(blink::WebInputEvent::Type type, |
| 295 InputEventAckState ack_result) { | 295 InputEventAckState ack_result) { |
| 296 scoped_ptr<IPC::Message> response( | 296 InputEventAck ack; |
| 297 new InputHostMsg_HandleInputEvent_ACK(0, type, ack_result, | 297 ack.type = type; |
| 298 ui::LatencyInfo())); | 298 ack.state = ack_result; |
| 299 input_router_->OnMessageReceived(*response); | 299 input_router_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack)); |
| 300 } | 300 } |
| 301 | 301 |
| 302 InputRouterImpl* input_router() const { | 302 InputRouterImpl* input_router() const { |
| 303 return input_router_.get(); | 303 return input_router_.get(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 bool TouchEventQueueEmpty() const { | 306 bool TouchEventQueueEmpty() const { |
| 307 return input_router()->touch_event_queue_.empty(); | 307 return input_router()->touch_event_queue_.empty(); |
| 308 } | 308 } |
| 309 | 309 |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 EXPECT_EQ(1, client_->in_flight_event_count()); | 1647 EXPECT_EQ(1, client_->in_flight_event_count()); |
| 1648 | 1648 |
| 1649 // Ack the wheel event. | 1649 // Ack the wheel event. |
| 1650 SendInputEventACK(WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED); | 1650 SendInputEventACK(WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED); |
| 1651 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); | 1651 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); |
| 1652 EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount()); | 1652 EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount()); |
| 1653 EXPECT_EQ(0, client_->in_flight_event_count()); | 1653 EXPECT_EQ(0, client_->in_flight_event_count()); |
| 1654 } | 1654 } |
| 1655 | 1655 |
| 1656 } // namespace content | 1656 } // namespace content |
| OLD | NEW |