| 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   ~MockInputRouterClient() override; |  20   ~MockInputRouterClient() override; | 
|  21  |  21  | 
|  22   // InputRouterClient |  22   // InputRouterClient | 
|  23   InputEventAckState FilterInputEvent( |  23   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   void IncrementInFlightEventCount() override; |  26   void IncrementInFlightEventCount() override; | 
|  27   void DecrementInFlightEventCount() override; |  27   void DecrementInFlightEventCount() override; | 
|  28   void OnHasTouchEventHandlers(bool has_handlers) override; |  28   void OnHasTouchEventHandlers(bool has_handlers) override; | 
|  29   void DidFlush() override; |  29   void SetNeedsFlushInput() override; | 
 |  30   void DidFlushAllInput() override; | 
|  30   void DidOverscroll(const DidOverscrollParams& params) override; |  31   void DidOverscroll(const DidOverscrollParams& params) override; | 
|  31   void DidStopFlinging() override; |  32   void DidStopFlinging() override; | 
|  32  |  33  | 
|  33   bool GetAndResetFilterEventCalled(); |  34   bool GetAndResetFilterEventCalled(); | 
|  34   size_t GetAndResetDidFlushCount(); |  35   size_t GetAndResetDidFlushCount(); | 
|  35   DidOverscrollParams GetAndResetOverscroll(); |  36   DidOverscrollParams GetAndResetOverscroll(); | 
|  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   } | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|  60   scoped_ptr<InputEvent> last_filter_event_; |  61   scoped_ptr<InputEvent> last_filter_event_; | 
|  61  |  62  | 
|  62   size_t did_flush_called_count_; |  63   size_t did_flush_called_count_; | 
|  63  |  64  | 
|  64   DidOverscrollParams overscroll_; |  65   DidOverscrollParams overscroll_; | 
|  65 }; |  66 }; | 
|  66  |  67  | 
|  67 }  // namespace content |  68 }  // namespace content | 
|  68  |  69  | 
|  69 #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 |