| OLD | NEW |
| 1 // Copyright (c) 2009 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 "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // might trigger |task| early. | 40 // might trigger |task| early. |
| 41 // | 41 // |
| 42 // Note: Windows does not currently do anything with the |window| argument for | 42 // Note: Windows does not currently do anything with the |window| argument for |
| 43 // these functions, so passing NULL is ok. | 43 // these functions, so passing NULL is ok. |
| 44 | 44 |
| 45 // Send a key press with/without modifier keys. | 45 // Send a key press with/without modifier keys. |
| 46 bool SendKeyPress(gfx::NativeWindow window, | 46 bool SendKeyPress(gfx::NativeWindow window, |
| 47 base::KeyboardCode key, | 47 base::KeyboardCode key, |
| 48 bool control, | 48 bool control, |
| 49 bool shift, | 49 bool shift, |
| 50 bool alt); | 50 bool alt, |
| 51 bool command); |
| 51 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, | 52 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, |
| 52 base::KeyboardCode key, | 53 base::KeyboardCode key, |
| 53 bool control, | 54 bool control, |
| 54 bool shift, | 55 bool shift, |
| 55 bool alt, | 56 bool alt, |
| 57 bool command, |
| 56 Task* task); | 58 Task* task); |
| 57 | 59 |
| 58 // Simulate a mouse move. (x,y) are absolute screen coordinates. | 60 // Simulate a mouse move. (x,y) are absolute screen coordinates. |
| 59 bool SendMouseMove(long x, long y); | 61 bool SendMouseMove(long x, long y); |
| 60 bool SendMouseMoveNotifyWhenDone(long x, long y, Task* task); | 62 bool SendMouseMoveNotifyWhenDone(long x, long y, Task* task); |
| 61 | 63 |
| 62 enum MouseButton { | 64 enum MouseButton { |
| 63 LEFT = 0, | 65 LEFT = 0, |
| 64 MIDDLE, | 66 MIDDLE, |
| 65 RIGHT, | 67 RIGHT, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 79 // Same as SendMouseEvents with UP | DOWN. | 81 // Same as SendMouseEvents with UP | DOWN. |
| 80 bool SendMouseClick(MouseButton type); | 82 bool SendMouseClick(MouseButton type); |
| 81 | 83 |
| 82 // A combination of SendMouseMove to the middle of the view followed by | 84 // A combination of SendMouseMove to the middle of the view followed by |
| 83 // SendMouseEvents. | 85 // SendMouseEvents. |
| 84 void MoveMouseToCenterAndPress( | 86 void MoveMouseToCenterAndPress( |
| 85 #if defined(TOOLKIT_VIEWS) | 87 #if defined(TOOLKIT_VIEWS) |
| 86 views::View* view, | 88 views::View* view, |
| 87 #elif defined(TOOLKIT_GTK) | 89 #elif defined(TOOLKIT_GTK) |
| 88 GtkWidget* widget, | 90 GtkWidget* widget, |
| 91 #elif defined(OS_MACOSX) |
| 92 NSWindow* window, |
| 89 #endif | 93 #endif |
| 90 MouseButton button, | 94 MouseButton button, |
| 91 int state, | 95 int state, |
| 92 Task* task); | 96 Task* task); |
| 93 | 97 |
| 94 } // ui_controls | 98 } // ui_controls |
| 95 | 99 |
| 96 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ | 100 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ |
| OLD | NEW |