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 #include <utility> |
9 | 10 |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "content/browser/renderer_host/input/input_ack_handler.h" | 12 #include "content/browser/renderer_host/input/input_ack_handler.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 class InputRouter; | 16 class InputRouter; |
16 | 17 |
17 class MockInputAckHandler : public InputAckHandler { | 18 class MockInputAckHandler : public InputAckHandler { |
18 public: | 19 public: |
(...skipping 13 matching lines...) Expand all Loading... |
32 InputEventAckState ack_result) override; | 33 InputEventAckState ack_result) override; |
33 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; | 34 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; |
34 | 35 |
35 size_t GetAndResetAckCount(); | 36 size_t GetAndResetAckCount(); |
36 | 37 |
37 void set_input_router(InputRouter* input_router) { | 38 void set_input_router(InputRouter* input_router) { |
38 input_router_ = input_router; | 39 input_router_ = input_router; |
39 } | 40 } |
40 | 41 |
41 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) { | 42 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) { |
42 gesture_followup_event_ = event.Pass(); | 43 gesture_followup_event_ = std::move(event); |
43 } | 44 } |
44 | 45 |
45 void set_followup_touch_event(scoped_ptr<TouchEventWithLatencyInfo> event) { | 46 void set_followup_touch_event(scoped_ptr<TouchEventWithLatencyInfo> event) { |
46 touch_followup_event_ = event.Pass(); | 47 touch_followup_event_ = std::move(event); |
47 } | 48 } |
48 | 49 |
49 bool unexpected_event_ack_called() const { | 50 bool unexpected_event_ack_called() const { |
50 return unexpected_event_ack_called_; | 51 return unexpected_event_ack_called_; |
51 } | 52 } |
52 InputEventAckState ack_state() const { return ack_state_; } | 53 InputEventAckState ack_state() const { return ack_state_; } |
53 | 54 |
54 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; } | 55 blink::WebInputEvent::Type ack_event_type() const { return ack_event_type_; } |
55 | 56 |
56 const NativeWebKeyboardEvent& acked_keyboard_event() const { | 57 const NativeWebKeyboardEvent& acked_keyboard_event() const { |
(...skipping 25 matching lines...) Expand all Loading... |
82 blink::WebGestureEvent acked_gesture_event_; | 83 blink::WebGestureEvent acked_gesture_event_; |
83 blink::WebMouseEvent acked_mouse_event_; | 84 blink::WebMouseEvent acked_mouse_event_; |
84 | 85 |
85 scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; | 86 scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; |
86 scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_; | 87 scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_; |
87 }; | 88 }; |
88 | 89 |
89 } // namespace content | 90 } // namespace content |
90 | 91 |
91 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ | 92 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ |
OLD | NEW |