Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: content/browser/renderer_host/input/mock_input_ack_handler.cc

Issue 2782733002: MouseWheelEventQueue sends scrollEnd right away when latching is disabled. (Closed)
Patch Set: review comments addressed. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 VLOG(1) << __FUNCTION__ << " called!"; 41 VLOG(1) << __FUNCTION__ << " called!";
42 acked_mouse_event_ = event.event; 42 acked_mouse_event_ = event.event;
43 RecordAckCalled(event.event.type(), ack_result); 43 RecordAckCalled(event.event.type(), ack_result);
44 } 44 }
45 45
46 void MockInputAckHandler::OnWheelEventAck( 46 void MockInputAckHandler::OnWheelEventAck(
47 const MouseWheelEventWithLatencyInfo& event, 47 const MouseWheelEventWithLatencyInfo& event,
48 InputEventAckState ack_result) { 48 InputEventAckState ack_result) {
49 VLOG(1) << __FUNCTION__ << " called!"; 49 VLOG(1) << __FUNCTION__ << " called!";
50 acked_wheel_event_ = event.event; 50 acked_wheel_event_ = event.event;
51 acked_wheel_event_state_ = ack_result;
51 RecordAckCalled(event.event.type(), ack_result); 52 RecordAckCalled(event.event.type(), ack_result);
52 } 53 }
53 54
54 void MockInputAckHandler::OnTouchEventAck( 55 void MockInputAckHandler::OnTouchEventAck(
55 const TouchEventWithLatencyInfo& event, 56 const TouchEventWithLatencyInfo& event,
56 InputEventAckState ack_result) { 57 InputEventAckState ack_result) {
57 VLOG(1) << __FUNCTION__ << " called!"; 58 VLOG(1) << __FUNCTION__ << " called!";
58 acked_touch_event_ = event; 59 acked_touch_event_ = event;
59 RecordAckCalled(event.event.type(), ack_result); 60 RecordAckCalled(event.event.type(), ack_result);
60 if (touch_followup_event_) 61 if (touch_followup_event_)
(...skipping 22 matching lines...) Expand all
83 } 84 }
84 85
85 void MockInputAckHandler::RecordAckCalled(blink::WebInputEvent::Type type, 86 void MockInputAckHandler::RecordAckCalled(blink::WebInputEvent::Type type,
86 InputEventAckState ack_result) { 87 InputEventAckState ack_result) {
87 ack_event_type_ = type; 88 ack_event_type_ = type;
88 ++ack_count_; 89 ++ack_count_;
89 ack_state_ = ack_result; 90 ack_state_ = ack_result;
90 } 91 }
91 92
92 } // namespace content 93 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698