| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| 11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
| 12 #include <wtypes.h> | 12 #include <wtypes.h> |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include "base/keyboard_codes.h" | 15 #include "app/keyboard_codes.h" |
| 16 #include "gfx/native_widget_types.h" | 16 #include "gfx/native_widget_types.h" |
| 17 #include "gfx/point.h" | 17 #include "gfx/point.h" |
| 18 | 18 |
| 19 #if defined(TOOLKIT_VIEWS) | 19 #if defined(TOOLKIT_VIEWS) |
| 20 namespace views { | 20 namespace views { |
| 21 class View; | 21 class View; |
| 22 } | 22 } |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 class Task; | 25 class Task; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 39 // might trigger |task| early. | 39 // might trigger |task| early. |
| 40 // | 40 // |
| 41 // Note: Windows does not currently do anything with the |window| argument for | 41 // Note: Windows does not currently do anything with the |window| argument for |
| 42 // these functions, so passing NULL is ok. | 42 // these functions, so passing NULL is ok. |
| 43 | 43 |
| 44 // Send a key press with/without modifier keys. | 44 // Send a key press with/without modifier keys. |
| 45 // | 45 // |
| 46 // If you're writing a test chances are you want the variant in ui_test_utils. | 46 // If you're writing a test chances are you want the variant in ui_test_utils. |
| 47 // See it for details. | 47 // See it for details. |
| 48 bool SendKeyPress(gfx::NativeWindow window, | 48 bool SendKeyPress(gfx::NativeWindow window, |
| 49 base::KeyboardCode key, | 49 app::KeyboardCode key, |
| 50 bool control, | 50 bool control, |
| 51 bool shift, | 51 bool shift, |
| 52 bool alt, | 52 bool alt, |
| 53 bool command); | 53 bool command); |
| 54 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, | 54 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, |
| 55 base::KeyboardCode key, | 55 app::KeyboardCode key, |
| 56 bool control, | 56 bool control, |
| 57 bool shift, | 57 bool shift, |
| 58 bool alt, | 58 bool alt, |
| 59 bool command, | 59 bool command, |
| 60 Task* task); | 60 Task* task); |
| 61 | 61 |
| 62 // Simulate a mouse move. (x,y) are absolute screen coordinates. | 62 // Simulate a mouse move. (x,y) are absolute screen coordinates. |
| 63 bool SendMouseMove(long x, long y); | 63 bool SendMouseMove(long x, long y); |
| 64 bool SendMouseMoveNotifyWhenDone(long x, long y, Task* task); | 64 bool SendMouseMoveNotifyWhenDone(long x, long y, Task* task); |
| 65 | 65 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 93 #elif defined(OS_MACOSX) | 93 #elif defined(OS_MACOSX) |
| 94 NSView* view, | 94 NSView* view, |
| 95 #endif | 95 #endif |
| 96 MouseButton button, | 96 MouseButton button, |
| 97 int state, | 97 int state, |
| 98 Task* task); | 98 Task* task); |
| 99 | 99 |
| 100 } // ui_controls | 100 } // ui_controls |
| 101 | 101 |
| 102 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ | 102 #endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_ |
| OLD | NEW |