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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 11 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 bool unexpected_event_ack_called() const { 53 bool unexpected_event_ack_called() const {
54 return unexpected_event_ack_called_; 54 return unexpected_event_ack_called_;
55 } 55 }
56 InputEventAckState ack_state() const { return ack_state_; } 56 InputEventAckState ack_state() const { return ack_state_; }
57 57
58 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; } 58 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; }
59 59
60 const NativeWebKeyboardEvent& acked_keyboard_event() const { 60 const NativeWebKeyboardEvent& acked_keyboard_event() const {
61 return acked_key_event_; 61 return *acked_key_event_;
62 } 62 }
63 const blink::WebMouseWheelEvent& acked_wheel_event() const { 63 const blink::WebMouseWheelEvent& acked_wheel_event() const {
64 return acked_wheel_event_; 64 return acked_wheel_event_;
65 } 65 }
66 const TouchEventWithLatencyInfo& acked_touch_event() const { 66 const TouchEventWithLatencyInfo& acked_touch_event() const {
67 return acked_touch_event_; 67 return acked_touch_event_;
68 } 68 }
69 const blink::WebGestureEvent& acked_gesture_event() const { 69 const blink::WebGestureEvent& acked_gesture_event() const {
70 return acked_gesture_event_; 70 return acked_gesture_event_;
71 } 71 }
72 72
73 private: 73 private:
74 void RecordAckCalled(blink::WebInputEvent::Type eventType, 74 void RecordAckCalled(blink::WebInputEvent::Type eventType,
75 InputEventAckState ack_result); 75 InputEventAckState ack_result);
76 76
77 InputRouter* input_router_; 77 InputRouter* input_router_;
78 78
79 size_t ack_count_; 79 size_t ack_count_;
80 bool unexpected_event_ack_called_; 80 bool unexpected_event_ack_called_;
81 blink::WebInputEvent::Type ack_event_type_; 81 blink::WebInputEvent::Type ack_event_type_;
82 InputEventAckState ack_state_; 82 InputEventAckState ack_state_;
83 NativeWebKeyboardEvent acked_key_event_; 83 std::unique_ptr<NativeWebKeyboardEvent> acked_key_event_;
84 blink::WebMouseWheelEvent acked_wheel_event_; 84 blink::WebMouseWheelEvent acked_wheel_event_;
85 TouchEventWithLatencyInfo acked_touch_event_; 85 TouchEventWithLatencyInfo acked_touch_event_;
86 blink::WebGestureEvent acked_gesture_event_; 86 blink::WebGestureEvent acked_gesture_event_;
87 blink::WebMouseEvent acked_mouse_event_; 87 blink::WebMouseEvent acked_mouse_event_;
88 88
89 std::unique_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; 89 std::unique_ptr<GestureEventWithLatencyInfo> gesture_followup_event_;
90 std::unique_ptr<TouchEventWithLatencyInfo> touch_followup_event_; 90 std::unique_ptr<TouchEventWithLatencyInfo> touch_followup_event_;
91 }; 91 };
92 92
93 } // namespace content 93 } // namespace content
94 94
95 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ 95 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698