Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: content/browser/renderer_host/input/input_router_unittest.h

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
29 // Called on SetUp. 29 // Called on SetUp.
30 virtual scoped_ptr<InputRouter> CreateInputRouter(RenderProcessHost* process, 30 virtual scoped_ptr<InputRouter> CreateInputRouter(RenderProcessHost* process,
31 InputRouterClient* client, 31 InputRouterClient* client,
32 InputAckHandler* handler, 32 InputAckHandler* handler,
33 int routing_id) = 0; 33 int routing_id) = 0;
34 34
35 // testing::Test 35 // testing::Test
36 virtual void SetUp() OVERRIDE; 36 virtual void SetUp() OVERRIDE;
37 virtual void TearDown() OVERRIDE; 37 virtual void TearDown() OVERRIDE;
38 38
39 void SendInputEventACK(WebKit::WebInputEvent::Type type, 39 void SendInputEventACK(blink::WebInputEvent::Type type,
40 InputEventAckState ack_result); 40 InputEventAckState ack_result);
41 void SimulateKeyboardEvent(WebKit::WebInputEvent::Type type, 41 void SimulateKeyboardEvent(blink::WebInputEvent::Type type,
42 bool is_shortcut); 42 bool is_shortcut);
43 void SimulateWheelEvent(float dX, float dY, int modifiers, bool precise); 43 void SimulateWheelEvent(float dX, float dY, int modifiers, bool precise);
44 void SimulateMouseMove(int x, int y, int modifiers); 44 void SimulateMouseMove(int x, int y, int modifiers);
45 void SimulateWheelEventWithPhase(WebKit::WebMouseWheelEvent::Phase phase); 45 void SimulateWheelEventWithPhase(blink::WebMouseWheelEvent::Phase phase);
46 void SimulateGestureEvent(const WebKit::WebGestureEvent& event); 46 void SimulateGestureEvent(const blink::WebGestureEvent& event);
47 void SimulateGestureEvent(WebKit::WebInputEvent::Type type, 47 void SimulateGestureEvent(blink::WebInputEvent::Type type,
48 WebKit::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 WebKit::WebGestureEvent::SourceDevice sourceDevice); 57 blink::WebGestureEvent::SourceDevice sourceDevice);
58 void SimulateTouchEvent(int x, int y); 58 void SimulateTouchEvent(int x, int y);
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 68
69 scoped_ptr<MockRenderProcessHost> process_; 69 scoped_ptr<MockRenderProcessHost> process_;
70 scoped_ptr<MockInputRouterClient> client_; 70 scoped_ptr<MockInputRouterClient> client_;
71 scoped_ptr<MockInputAckHandler> ack_handler_; 71 scoped_ptr<MockInputAckHandler> ack_handler_;
72 scoped_ptr<InputRouter> input_router_; 72 scoped_ptr<InputRouter> input_router_;
73 73
74 private: 74 private:
75 base::MessageLoopForUI message_loop_; 75 base::MessageLoopForUI message_loop_;
76 SyntheticWebTouchEvent touch_event_; 76 SyntheticWebTouchEvent touch_event_;
77 77
78 scoped_ptr<TestBrowserContext> browser_context_; 78 scoped_ptr<TestBrowserContext> browser_context_;
79 }; 79 };
80 80
81 } // namespace content 81 } // namespace content
82 82
83 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_UNITTEST_H_ 83 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698