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

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

Issue 24312009: Properly forward queued touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test Created 7 years, 2 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/renderer_host/input/input_ack_handler.h" 9 #include "content/browser/renderer_host/input/input_ack_handler.h"
10 10
(...skipping 17 matching lines...) Expand all
28 InputEventAckState ack_result) OVERRIDE; 28 InputEventAckState ack_result) OVERRIDE;
29 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 29 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
30 30
31 void ExpectAckCalled(int times); 31 void ExpectAckCalled(int times);
32 32
33 void set_input_router(InputRouter* input_router) { 33 void set_input_router(InputRouter* input_router) {
34 input_router_ = input_router; 34 input_router_ = input_router;
35 } 35 }
36 36
37 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) { 37 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) {
38 gesture_followup_event_ = event.Pass();
39 }
40
41 void set_followup_touch_event(scoped_ptr<TouchEventWithLatencyInfo> event) {
38 touch_followup_event_ = event.Pass(); 42 touch_followup_event_ = event.Pass();
39 } 43 }
40 44
41 bool unexpected_event_ack_called() const { 45 bool unexpected_event_ack_called() const {
42 return unexpected_event_ack_called_; 46 return unexpected_event_ack_called_;
43 } 47 }
44 InputEventAckState ack_state() const { return ack_state_; } 48 InputEventAckState ack_state() const { return ack_state_; }
45 49
46 const NativeWebKeyboardEvent& acked_keyboard_event() const { 50 const NativeWebKeyboardEvent& acked_keyboard_event() const {
47 return acked_key_event_; 51 return acked_key_event_;
(...skipping 14 matching lines...) Expand all
62 InputRouter* input_router_; 66 InputRouter* input_router_;
63 67
64 int ack_count_; 68 int ack_count_;
65 bool unexpected_event_ack_called_; 69 bool unexpected_event_ack_called_;
66 InputEventAckState ack_state_; 70 InputEventAckState ack_state_;
67 NativeWebKeyboardEvent acked_key_event_; 71 NativeWebKeyboardEvent acked_key_event_;
68 WebKit::WebMouseWheelEvent acked_wheel_event_; 72 WebKit::WebMouseWheelEvent acked_wheel_event_;
69 TouchEventWithLatencyInfo acked_touch_event_; 73 TouchEventWithLatencyInfo acked_touch_event_;
70 WebKit::WebGestureEvent acked_gesture_event_; 74 WebKit::WebGestureEvent acked_gesture_event_;
71 75
72 scoped_ptr<GestureEventWithLatencyInfo> touch_followup_event_; 76 scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_;
77 scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_;
73 }; 78 };
74 79
75 } // namespace content 80 } // namespace content
76 81
77 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ 82 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698