summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/automation/tab_proxy.cc18
-rw-r--r--chrome/test/automation/tab_proxy.h5
2 files changed, 7 insertions, 16 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index f6142e1..088bd69 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -609,9 +609,10 @@ bool TabProxy::OverrideEncoding(const std::wstring& encoding) {
#if defined(OS_WIN)
void TabProxy::Reposition(HWND window, HWND window_insert_after, int left,
- int top, int width, int height, int flags) {
+ int top, int width, int height, int flags,
+ HWND parent_window) {
- IPC::Reposition_Params params;
+ IPC::Reposition_Params params = {0};
params.window = window;
params.window_insert_after = window_insert_after;
params.left = left;
@@ -619,20 +620,9 @@ void TabProxy::Reposition(HWND window, HWND window_insert_after, int left,
params.width = width;
params.height = height;
params.flags = flags;
- params.set_parent = false;
- params.parent_window = NULL;
- sender_->Send(new AutomationMsg_TabReposition(0, handle_, params));
-}
-
-void TabProxy::SetParentWindow(HWND window, HWND parent_window, long flags) {
- IPC::Reposition_Params params = {0};
- params.window = window;
- params.flags = flags;
- params.set_parent = true;
+ params.set_parent = (::IsWindow(parent_window) ? true : false);
params.parent_window = parent_window;
-
sender_->Send(new AutomationMsg_TabReposition(0, handle_, params));
}
-
#endif // defined(OS_WIN)
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h
index e05701f..4bdb4a2 100644
--- a/chrome/test/automation/tab_proxy.h
+++ b/chrome/test/automation/tab_proxy.h
@@ -287,9 +287,10 @@ class TabProxy : public AutomationResourceProxy {
#if defined(OS_WIN)
// Resizes the tab window.
+ // The parent_window parameter allows a parent to be specified for the window
+ // passed in.
void Reposition(HWND window, HWND window_insert_after, int left, int top,
- int width, int height, int flags);
- void SetParentWindow(HWND window, HWND parent_window, long flags);
+ int width, int height, int flags, HWND parent_window);
#endif // defined(OS_WIN)
private: