| 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_INPUT_ROUTER_UNITTEST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_UNITTEST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_UNITTEST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_UNITTEST_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/browser/renderer_host/input/mock_input_ack_handler.h" | 10 #include "content/browser/renderer_host/input/mock_input_ack_handler.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 blink::WebGestureEvent::SourceDevice sourceDevice); | 48 blink::WebGestureEvent::SourceDevice sourceDevice); |
| 49 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers); | 49 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers); |
| 50 void SimulateGesturePinchUpdateEvent(float scale, | 50 void SimulateGesturePinchUpdateEvent(float scale, |
| 51 float anchorX, | 51 float anchorX, |
| 52 float anchorY, | 52 float anchorY, |
| 53 int modifiers); | 53 int modifiers); |
| 54 void SimulateGestureFlingStartEvent( | 54 void SimulateGestureFlingStartEvent( |
| 55 float velocityX, | 55 float velocityX, |
| 56 float velocityY, | 56 float velocityY, |
| 57 blink::WebGestureEvent::SourceDevice sourceDevice); | 57 blink::WebGestureEvent::SourceDevice sourceDevice); |
| 58 void SimulateTouchEvent(int x, int y); | 58 void SimulateTouchEvent(blink::WebInputEvent::Type type); |
| 59 void SetTouchTimestamp(base::TimeDelta timestamp); | 59 void SetTouchTimestamp(base::TimeDelta timestamp); |
| 60 | 60 |
| 61 // Sends a touch event (irrespective of whether the page has a touch-event | 61 // Sends a touch event (irrespective of whether the page has a touch-event |
| 62 // handler or not). | 62 // handler or not). |
| 63 void SendTouchEvent(); | 63 void SendTouchEvent(); |
| 64 | 64 |
| 65 int PressTouchPoint(int x, int y); | 65 int PressTouchPoint(int x, int y); |
| 66 void MoveTouchPoint(int index, int x, int y); | 66 void MoveTouchPoint(int index, int x, int y); |
| 67 void ReleaseTouchPoint(int index); | 67 void ReleaseTouchPoint(int index); |
| 68 void CancelTouchPoint(int index); |
| 68 | 69 |
| 69 scoped_ptr<MockRenderProcessHost> process_; | 70 scoped_ptr<MockRenderProcessHost> process_; |
| 70 scoped_ptr<MockInputRouterClient> client_; | 71 scoped_ptr<MockInputRouterClient> client_; |
| 71 scoped_ptr<MockInputAckHandler> ack_handler_; | 72 scoped_ptr<MockInputAckHandler> ack_handler_; |
| 72 scoped_ptr<InputRouter> input_router_; | 73 scoped_ptr<InputRouter> input_router_; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 base::MessageLoopForUI message_loop_; | 76 base::MessageLoopForUI message_loop_; |
| 76 SyntheticWebTouchEvent touch_event_; | 77 SyntheticWebTouchEvent touch_event_; |
| 77 | 78 |
| 78 scoped_ptr<TestBrowserContext> browser_context_; | 79 scoped_ptr<TestBrowserContext> browser_context_; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace content | 82 } // namespace content |
| 82 | 83 |
| 83 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_UNITTEST_H_ | 84 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_UNITTEST_H_ |
| OLD | NEW |