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_ROUTER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 12 matching lines...) Expand all Loading... |
23 ~MockInputRouterClient() override; | 23 ~MockInputRouterClient() override; |
24 | 24 |
25 // InputRouterClient | 25 // InputRouterClient |
26 InputEventAckState FilterInputEvent( | 26 InputEventAckState FilterInputEvent( |
27 const blink::WebInputEvent& input_event, | 27 const blink::WebInputEvent& input_event, |
28 const ui::LatencyInfo& latency_info) override; | 28 const ui::LatencyInfo& latency_info) override; |
29 void IncrementInFlightEventCount( | 29 void IncrementInFlightEventCount( |
30 blink::WebInputEvent::Type event_type) override; | 30 blink::WebInputEvent::Type event_type) override; |
31 void DecrementInFlightEventCount(InputEventAckSource ack_source) override; | 31 void DecrementInFlightEventCount(InputEventAckSource ack_source) override; |
32 void OnHasTouchEventHandlers(bool has_handlers) override; | 32 void OnHasTouchEventHandlers(bool has_handlers) override; |
33 void DidFlush() override; | |
34 void DidOverscroll(const ui::DidOverscrollParams& params) override; | 33 void DidOverscroll(const ui::DidOverscrollParams& params) override; |
35 void DidStopFlinging() override; | 34 void DidStopFlinging() override; |
36 void ForwardGestureEventWithLatencyInfo( | 35 void ForwardGestureEventWithLatencyInfo( |
37 const blink::WebGestureEvent& gesture_event, | 36 const blink::WebGestureEvent& gesture_event, |
38 const ui::LatencyInfo& latency_info) override; | 37 const ui::LatencyInfo& latency_info) override; |
39 | 38 |
40 bool GetAndResetFilterEventCalled(); | 39 bool GetAndResetFilterEventCalled(); |
41 size_t GetAndResetDidFlushCount(); | |
42 ui::DidOverscrollParams GetAndResetOverscroll(); | 40 ui::DidOverscrollParams GetAndResetOverscroll(); |
43 | 41 |
44 void set_input_router(InputRouter* input_router) { | 42 void set_input_router(InputRouter* input_router) { |
45 input_router_ = input_router; | 43 input_router_ = input_router; |
46 } | 44 } |
47 | 45 |
48 bool has_touch_handler() const { return has_touch_handler_; } | 46 bool has_touch_handler() const { return has_touch_handler_; } |
49 void set_filter_state(InputEventAckState filter_state) { | 47 void set_filter_state(InputEventAckState filter_state) { |
50 filter_state_ = filter_state; | 48 filter_state_ = filter_state; |
51 } | 49 } |
(...skipping 10 matching lines...) Expand all Loading... |
62 private: | 60 private: |
63 InputRouter* input_router_; | 61 InputRouter* input_router_; |
64 int in_flight_event_count_; | 62 int in_flight_event_count_; |
65 bool has_touch_handler_; | 63 bool has_touch_handler_; |
66 | 64 |
67 InputEventAckState filter_state_; | 65 InputEventAckState filter_state_; |
68 | 66 |
69 bool filter_input_event_called_; | 67 bool filter_input_event_called_; |
70 std::unique_ptr<InputEvent> last_filter_event_; | 68 std::unique_ptr<InputEvent> last_filter_event_; |
71 | 69 |
72 size_t did_flush_called_count_; | |
73 | |
74 ui::DidOverscrollParams overscroll_; | 70 ui::DidOverscrollParams overscroll_; |
75 }; | 71 }; |
76 | 72 |
77 } // namespace content | 73 } // namespace content |
78 | 74 |
79 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ | 75 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ |
OLD | NEW |