| Index: chrome/browser/automation/automation_provider.cc
|
| ===================================================================
|
| --- chrome/browser/automation/automation_provider.cc (revision 19980)
|
| +++ chrome/browser/automation/automation_provider.cc (working copy)
|
| @@ -950,6 +950,7 @@
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowExecuteCommand,
|
| ExecuteBrowserCommand)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_WindowViewBounds, WindowGetViewBounds)
|
| + IPC_MESSAGE_HANDLER(AutomationMsg_SetWindowBounds, SetWindowBounds)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_SetWindowVisible, SetWindowVisible)
|
| #if defined(OS_WIN)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_WindowClick, WindowSimulateClick)
|
| @@ -1713,6 +1714,18 @@
|
| }
|
| }
|
|
|
| +void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds,
|
| + bool* success) {
|
| + *success = false;
|
| + if (window_tracker_->ContainsHandle(handle)) {
|
| + HWND hwnd = window_tracker_->GetResource(handle);
|
| + if (::MoveWindow(hwnd, bounds.x(), bounds.y(), bounds.width(),
|
| + bounds.height(), true)) {
|
| + *success = true;
|
| + }
|
| + }
|
| +}
|
| +
|
| void AutomationProvider::SetWindowVisible(int handle, bool visible,
|
| bool* result) {
|
| if (window_tracker_->ContainsHandle(handle)) {
|
|
|