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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/renderer_host/input/input_router_client.h" | 9 #include "content/browser/renderer_host/input/input_router_client.h" |
10 #include "content/common/input/did_overscroll_params.h" | 10 #include "content/common/input/did_overscroll_params.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class InputEvent; | 14 class InputEvent; |
15 class InputRouter; | 15 class InputRouter; |
16 | 16 |
17 class MockInputRouterClient : public InputRouterClient { | 17 class MockInputRouterClient : public InputRouterClient { |
18 public: | 18 public: |
19 MockInputRouterClient(); | 19 MockInputRouterClient(); |
20 virtual ~MockInputRouterClient(); | 20 virtual ~MockInputRouterClient(); |
21 | 21 |
22 // InputRouterClient | 22 // InputRouterClient |
23 virtual InputEventAckState FilterInputEvent( | 23 virtual InputEventAckState FilterInputEvent( |
24 const blink::WebInputEvent& input_event, | 24 const blink::WebInputEvent& input_event, |
25 const ui::LatencyInfo& latency_info) OVERRIDE; | 25 const ui::LatencyInfo& latency_info) override; |
26 virtual void IncrementInFlightEventCount() OVERRIDE; | 26 virtual void IncrementInFlightEventCount() override; |
27 virtual void DecrementInFlightEventCount() OVERRIDE; | 27 virtual void DecrementInFlightEventCount() override; |
28 virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE; | 28 virtual void OnHasTouchEventHandlers(bool has_handlers) override; |
29 virtual void SetNeedsFlush() OVERRIDE; | 29 virtual void SetNeedsFlush() override; |
30 virtual void DidFlush() OVERRIDE; | 30 virtual void DidFlush() override; |
31 virtual void DidOverscroll(const DidOverscrollParams& params) OVERRIDE; | 31 virtual void DidOverscroll(const DidOverscrollParams& params) override; |
32 | 32 |
33 bool GetAndResetFilterEventCalled(); | 33 bool GetAndResetFilterEventCalled(); |
34 size_t GetAndResetDidFlushCount(); | 34 size_t GetAndResetDidFlushCount(); |
35 DidOverscrollParams GetAndResetOverscroll(); | 35 DidOverscrollParams GetAndResetOverscroll(); |
36 | 36 |
37 void set_input_router(InputRouter* input_router) { | 37 void set_input_router(InputRouter* input_router) { |
38 input_router_ = input_router; | 38 input_router_ = input_router; |
39 } | 39 } |
40 | 40 |
41 bool has_touch_handler() const { return has_touch_handler_; } | 41 bool has_touch_handler() const { return has_touch_handler_; } |
(...skipping 19 matching lines...) Expand all Loading... |
61 | 61 |
62 size_t did_flush_called_count_; | 62 size_t did_flush_called_count_; |
63 bool set_needs_flush_called_; | 63 bool set_needs_flush_called_; |
64 | 64 |
65 DidOverscrollParams overscroll_; | 65 DidOverscrollParams overscroll_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace content | 68 } // namespace content |
69 | 69 |
70 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ | 70 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ |
OLD | NEW |