summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 22:52:44 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 22:52:44 +0000
commit5e0f30c03417379891c4e0df39d935e4fbdb40ec (patch)
tree833c6ca64e26ed5266b32267a6caee9d2ead25eb /chrome/browser/automation
parent0f7a3cb6495f2e736b26be7799c73436ac2d15ac (diff)
downloadchromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.zip
chromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.tar.gz
chromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.tar.bz2
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc14
-rw-r--r--chrome/browser/automation/automation_provider.h3
2 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 818c321..f23e7d1 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1272,7 +1272,8 @@ void AutomationProvider::WindowSimulateClick(const IPC::Message& message,
void AutomationProvider::WindowSimulateDrag(const IPC::Message& message,
int handle,
std::vector<POINT> drag_path,
- int flags) {
+ int flags,
+ bool press_escape_en_route) {
bool succeeded = false;
if (browser_tracker_->ContainsHandle(handle) && (drag_path.size() > 1)) {
succeeded = true;
@@ -1313,6 +1314,17 @@ void AutomationProvider::WindowSimulateDrag(const IPC::Message& message,
}
POINT end = drag_path[drag_path.size() - 1];
SetCursorPos(end.x, end.y);
+
+ if (press_escape_en_route) {
+ // Press Escape.
+ ui_controls::SendKeyPress(VK_ESCAPE,
+ ((flags & ChromeViews::Event::EF_CONTROL_DOWN)
+ == ChromeViews::Event::EF_CONTROL_DOWN),
+ ((flags & ChromeViews::Event::EF_SHIFT_DOWN) ==
+ ChromeViews::Event::EF_SHIFT_DOWN),
+ ((flags & ChromeViews::Event::EF_ALT_DOWN) ==
+ ChromeViews::Event::EF_ALT_DOWN));
+ }
SendMessage(top_level_hwnd, up_message, wparam_flags,
MAKELPARAM(end.x, end.y));
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 35827c8..20f34a1 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -144,7 +144,8 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void WindowSimulateDrag(const IPC::Message& message,
int handle,
std::vector<POINT> drag_path,
- int flags);
+ int flags,
+ bool press_escape_en_route);
void WindowSimulateClick(const IPC::Message& message,
int handle,
POINT click,