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 "content/browser/renderer_host/input/mock_input_ack_handler.h" | 5 #include "content/browser/renderer_host/input/mock_input_ack_handler.h" |
6 | 6 |
7 #include "content/browser/renderer_host/input/input_router.h" | 7 #include "content/browser/renderer_host/input/input_router.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 using base::TimeDelta; | 10 using base::TimeDelta; |
(...skipping 29 matching lines...) Expand all Loading... |
40 InputEventAckState ack_result) { | 40 InputEventAckState ack_result) { |
41 VLOG(1) << __FUNCTION__ << " called!"; | 41 VLOG(1) << __FUNCTION__ << " called!"; |
42 acked_wheel_event_ = event.event; | 42 acked_wheel_event_ = event.event; |
43 RecordAckCalled(event.event.type, ack_result); | 43 RecordAckCalled(event.event.type, ack_result); |
44 } | 44 } |
45 | 45 |
46 void MockInputAckHandler::OnTouchEventAck( | 46 void MockInputAckHandler::OnTouchEventAck( |
47 const TouchEventWithLatencyInfo& event, | 47 const TouchEventWithLatencyInfo& event, |
48 InputEventAckState ack_result) { | 48 InputEventAckState ack_result) { |
49 VLOG(1) << __FUNCTION__ << " called!"; | 49 VLOG(1) << __FUNCTION__ << " called!"; |
| 50 LOG(ERROR) << " MockInputAckHandler::OnTouchEventAck "; |
50 acked_touch_event_ = event; | 51 acked_touch_event_ = event; |
51 RecordAckCalled(event.event.type, ack_result); | 52 RecordAckCalled(event.event.type, ack_result); |
52 if (touch_followup_event_) | 53 if (touch_followup_event_) |
53 input_router_->SendTouchEvent(*touch_followup_event_); | 54 input_router_->SendTouchEvent(*touch_followup_event_); |
54 if (gesture_followup_event_) | 55 if (gesture_followup_event_) |
55 input_router_->SendGestureEvent(*gesture_followup_event_); | 56 input_router_->SendGestureEvent(*gesture_followup_event_); |
56 } | 57 } |
57 | 58 |
58 void MockInputAckHandler::OnGestureEventAck( | 59 void MockInputAckHandler::OnGestureEventAck( |
59 const GestureEventWithLatencyInfo& event, | 60 const GestureEventWithLatencyInfo& event, |
(...skipping 15 matching lines...) Expand all Loading... |
75 } | 76 } |
76 | 77 |
77 void MockInputAckHandler::RecordAckCalled(blink::WebInputEvent::Type type, | 78 void MockInputAckHandler::RecordAckCalled(blink::WebInputEvent::Type type, |
78 InputEventAckState ack_result) { | 79 InputEventAckState ack_result) { |
79 ack_event_type_ = type; | 80 ack_event_type_ = type; |
80 ++ack_count_; | 81 ++ack_count_; |
81 ack_state_ = ack_result; | 82 ack_state_ = ack_result; |
82 } | 83 } |
83 | 84 |
84 } // namespace content | 85 } // namespace content |
OLD | NEW |