OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H__ | 5 #ifndef CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ |
6 #define CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H__ | 6 #define CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | |
10 #if defined(OS_WIN) | |
9 #include <wtypes.h> | 11 #include <wtypes.h> |
12 #endif | |
10 | 13 |
11 namespace views { | 14 namespace views { |
12 class View; | 15 class View; |
13 } | 16 } |
14 | 17 |
15 class Task; | 18 class Task; |
16 | 19 |
17 namespace ui_controls { | 20 namespace ui_controls { |
18 | 21 |
19 // Many of the functions in this class include a variant that takes a Task. | 22 // Many of the functions in this class include a variant that takes a Task. |
(...skipping 26 matching lines...) Expand all Loading... | |
46 enum MouseButtonState { | 49 enum MouseButtonState { |
47 UP = 1, | 50 UP = 1, |
48 DOWN = 2 | 51 DOWN = 2 |
49 }; | 52 }; |
50 | 53 |
51 // Sends a mouse down and or up message. | 54 // Sends a mouse down and or up message. |
52 bool SendMouseEvents(MouseButton type, int state); | 55 bool SendMouseEvents(MouseButton type, int state); |
53 void SendMouseEventsNotifyWhenDone(MouseButton type, int state, Task* task); | 56 void SendMouseEventsNotifyWhenDone(MouseButton type, int state, Task* task); |
54 | 57 |
55 // Simulate a single mouse click with given button type. | 58 // Simulate a single mouse click with given button type. |
56 bool SendMouseClick(MouseButton type); | 59 bool SendMouseClick(MouseButton type); |
tony
2009/08/12 19:04:13
Nit: Can you add stub functions in ui_controls_lin
| |
57 | 60 |
58 // A combination of SendMouseMove to the middle of the view followed by | 61 // A combination of SendMouseMove to the middle of the view followed by |
59 // SendMouseEvents. | 62 // SendMouseEvents. |
60 void MoveMouseToCenterAndPress(views::View* view, | 63 void MoveMouseToCenterAndPress(views::View* view, |
61 MouseButton button, | 64 MouseButton button, |
62 int state, | 65 int state, |
63 Task* task); | 66 Task* task); |
64 | 67 |
65 } // ui_controls | 68 } // ui_controls |
66 | 69 |
67 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H__ | 70 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ |
OLD | NEW |