| 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 #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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 void set_followup_touch_event( | 48 void set_followup_touch_event( |
| 49 std::unique_ptr<TouchEventWithLatencyInfo> event) { | 49 std::unique_ptr<TouchEventWithLatencyInfo> event) { |
| 50 touch_followup_event_ = std::move(event); | 50 touch_followup_event_ = std::move(event); |
| 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 InputEventAckState acked_wheel_event_state() const { |
| 59 return acked_wheel_event_state_; |
| 60 } |
| 61 |
| 58 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; } | 62 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; } |
| 59 | 63 |
| 60 const NativeWebKeyboardEvent& acked_keyboard_event() const { | 64 const NativeWebKeyboardEvent& acked_keyboard_event() const { |
| 61 return *acked_key_event_; | 65 return *acked_key_event_; |
| 62 } | 66 } |
| 63 const blink::WebMouseWheelEvent& acked_wheel_event() const { | 67 const blink::WebMouseWheelEvent& acked_wheel_event() const { |
| 64 return acked_wheel_event_; | 68 return acked_wheel_event_; |
| 65 } | 69 } |
| 66 const TouchEventWithLatencyInfo& acked_touch_event() const { | 70 const TouchEventWithLatencyInfo& acked_touch_event() const { |
| 67 return acked_touch_event_; | 71 return acked_touch_event_; |
| 68 } | 72 } |
| 69 const blink::WebGestureEvent& acked_gesture_event() const { | 73 const blink::WebGestureEvent& acked_gesture_event() const { |
| 70 return acked_gesture_event_; | 74 return acked_gesture_event_; |
| 71 } | 75 } |
| 72 | 76 |
| 73 private: | 77 private: |
| 74 void RecordAckCalled(blink::WebInputEvent::Type eventType, | 78 void RecordAckCalled(blink::WebInputEvent::Type eventType, |
| 75 InputEventAckState ack_result); | 79 InputEventAckState ack_result); |
| 76 | 80 |
| 77 InputRouter* input_router_; | 81 InputRouter* input_router_; |
| 78 | 82 |
| 79 size_t ack_count_; | 83 size_t ack_count_; |
| 80 bool unexpected_event_ack_called_; | 84 bool unexpected_event_ack_called_; |
| 81 blink::WebInputEvent::Type ack_event_type_; | 85 blink::WebInputEvent::Type ack_event_type_; |
| 82 InputEventAckState ack_state_; | 86 InputEventAckState ack_state_; |
| 87 InputEventAckState acked_wheel_event_state_; |
| 83 std::unique_ptr<NativeWebKeyboardEvent> acked_key_event_; | 88 std::unique_ptr<NativeWebKeyboardEvent> acked_key_event_; |
| 84 blink::WebMouseWheelEvent acked_wheel_event_; | 89 blink::WebMouseWheelEvent acked_wheel_event_; |
| 85 TouchEventWithLatencyInfo acked_touch_event_; | 90 TouchEventWithLatencyInfo acked_touch_event_; |
| 86 blink::WebGestureEvent acked_gesture_event_; | 91 blink::WebGestureEvent acked_gesture_event_; |
| 87 blink::WebMouseEvent acked_mouse_event_; | 92 blink::WebMouseEvent acked_mouse_event_; |
| 88 | 93 |
| 89 std::unique_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; | 94 std::unique_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; |
| 90 std::unique_ptr<TouchEventWithLatencyInfo> touch_followup_event_; | 95 std::unique_ptr<TouchEventWithLatencyInfo> touch_followup_event_; |
| 91 }; | 96 }; |
| 92 | 97 |
| 93 } // namespace content | 98 } // namespace content |
| 94 | 99 |
| 95 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ | 100 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ |
| OLD | NEW |