summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/ui_controls.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 02:16:21 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 02:16:21 +0000
commit22cdd93852c8f0782cb86b066cfcd95a9121912b (patch)
treebe0f742437de0f4bd0e9753270c22998d02fd947 /chrome/browser/automation/ui_controls.h
parentd3eb7bb27945410cb5d1f5d84f15f9c7017d519e (diff)
downloadchromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.zip
chromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.tar.gz
chromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.tar.bz2
more linux automation porting: SendKeyPressNotifyWhenDone
also change the interface for SimulateOSKeyPress()/SendKeyPress() to take a VKEY_ value (defined in base/keyboard_codes.h) rather than a VK_ value. BUG=19076 Review URL: http://codereview.chromium.org/171079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/ui_controls.h')
-rw-r--r--chrome/browser/automation/ui_controls.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/browser/automation/ui_controls.h b/chrome/browser/automation/ui_controls.h
index b8781e2..3460ec3 100644
--- a/chrome/browser/automation/ui_controls.h
+++ b/chrome/browser/automation/ui_controls.h
@@ -26,12 +26,24 @@ namespace ui_controls {
// Many of the functions in this class include a variant that takes a Task.
// The version that takes a Task waits until the generated event is processed.
-// Once the generated event is processed the Task is Run (and deleted).
+// Once the generated event is processed the Task is Run (and deleted). Note
+// that this is a somewhat fragile process in that any event of the correct
+// type (key down, mouse click, etc.) will trigger the Task to be run. Hence
+// a usage such as
+//
+// SendKeyPress(...);
+// SendKeyPressNotifyWhenDone(..., task);
+//
+// might trigger |task| early.
+//
+// Note: Windows does not currently do anything with the |window| argument for
+// these functions, so passing NULL is ok.
// Send a key press with/without modifier keys.
bool SendKeyPress(gfx::NativeWindow window, wchar_t key, bool control,
bool shift, bool alt);
-bool SendKeyPressNotifyWhenDone(wchar_t key, bool control, bool shift,
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, wchar_t key,
+ bool control, bool shift,
bool alt, Task* task);
// Send a key down event. Use VK_CONTROL for ctrl key,