| 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 "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 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 class InputRouter; | 13 class InputRouter; |
| 14 | 14 |
| 15 class MockInputAckHandler : public InputAckHandler { | 15 class MockInputAckHandler : public InputAckHandler { |
| 16 public: | 16 public: |
| 17 MockInputAckHandler(); | 17 MockInputAckHandler(); |
| 18 virtual ~MockInputAckHandler(); | 18 virtual ~MockInputAckHandler(); |
| 19 | 19 |
| 20 // InputAckHandler | 20 // InputAckHandler |
| 21 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, | 21 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, |
| 22 InputEventAckState ack_result) OVERRIDE; | 22 InputEventAckState ack_result) OVERRIDE; |
| 23 virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event, | 23 virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event, |
| 24 InputEventAckState ack_result) OVERRIDE; | 24 InputEventAckState ack_result, |
| 25 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, | 25 ui::LatencyInfo* latency) OVERRIDE; |
| 26 InputEventAckState ack_result) OVERRIDE; | 26 virtual void OnTouchEventAck(const WebKit::WebTouchEvent& event, |
| 27 InputEventAckState ack_result, |
| 28 ui::LatencyInfo* latency) OVERRIDE; |
| 27 virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event, | 29 virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event, |
| 28 InputEventAckState ack_result) OVERRIDE; | 30 InputEventAckState ack_result, |
| 31 ui::LatencyInfo* latency) OVERRIDE; |
| 29 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; | 32 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; |
| 30 | 33 |
| 31 void ExpectAckCalled(int times); | 34 void ExpectAckCalled(int times); |
| 32 | 35 |
| 33 void set_input_router(InputRouter* input_router) { | 36 void set_input_router(InputRouter* input_router) { |
| 34 input_router_ = input_router; | 37 input_router_ = input_router; |
| 35 } | 38 } |
| 36 | 39 |
| 37 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) { | 40 void set_followup_touch_event(scoped_ptr<GestureEventWithLatencyInfo> event) { |
| 38 gesture_followup_event_ = event.Pass(); | 41 gesture_followup_event_ = event.Pass(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 TouchEventWithLatencyInfo acked_touch_event_; | 76 TouchEventWithLatencyInfo acked_touch_event_; |
| 74 WebKit::WebGestureEvent acked_gesture_event_; | 77 WebKit::WebGestureEvent acked_gesture_event_; |
| 75 | 78 |
| 76 scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; | 79 scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; |
| 77 scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_; | 80 scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_; |
| 78 }; | 81 }; |
| 79 | 82 |
| 80 } // namespace content | 83 } // namespace content |
| 81 | 84 |
| 82 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ | 85 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_ |
| OLD | NEW |