diff options
Diffstat (limited to 'chrome')
6 files changed, 15 insertions, 5 deletions
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index d8e8d0b..c55e04c 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -805,6 +805,7 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void ConnectExternalTab(uint64 cookie, bool allow, + gfx::NativeWindow parent_window, gfx::NativeWindow* tab_container_window, gfx::NativeWindow* tab_window, int* tab_handle); diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc index 6e92685..dbc8c48 100644 --- a/chrome/browser/automation/automation_provider_win.cc +++ b/chrome/browser/automation/automation_provider_win.cc @@ -425,6 +425,7 @@ void AutomationProvider::OnForwardContextMenuCommandToChrome(int tab_handle, void AutomationProvider::ConnectExternalTab( uint64 cookie, bool allow, + gfx::NativeWindow parent_window, gfx::NativeWindow* tab_container_window, gfx::NativeWindow* tab_window, int* tab_handle) { @@ -441,7 +442,8 @@ void AutomationProvider::ConnectExternalTab( if (allow && AddExternalTab(external_tab_container)) { external_tab_container->Reinitialize(this, - automation_resource_message_filter_); + automation_resource_message_filter_, + parent_window); TabContents* tab_contents = external_tab_container->tab_contents(); *tab_handle = external_tab_container->tab_handle(); *tab_container_window = external_tab_container->GetNativeView(); diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index 116b7a5..8c08ec4 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -197,7 +197,8 @@ void ExternalTabContainer::Uninitialize() { bool ExternalTabContainer::Reinitialize( AutomationProvider* automation_provider, - AutomationResourceMessageFilter* filter) { + AutomationResourceMessageFilter* filter, + gfx::NativeWindow parent_window) { if (!automation_provider || !filter) { NOTREACHED(); return false; @@ -211,6 +212,9 @@ bool ExternalTabContainer::Reinitialize( FROM_HERE, external_method_factory_.NewRunnableMethod( &ExternalTabContainer::OnReinitialize)); + + if (parent_window) + SetParent(GetNativeView(), parent_window); return true; } diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h index 731f07d..f9a51d0 100644 --- a/chrome/browser/external_tab_container_win.h +++ b/chrome/browser/external_tab_container_win.h @@ -79,7 +79,8 @@ class ExternalTabContainer : public TabContentsDelegate, // for this container. Typically used when an ExternalTabContainer // instance is created by Chrome and attached to an automation client. bool Reinitialize(AutomationProvider* automation_provider, - AutomationResourceMessageFilter* filter); + AutomationResourceMessageFilter* filter, + gfx::NativeWindow parent_window); // This is invoked when the external host reflects back to us a keyboard // message it did not process diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 208dba6..bdb0d07 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -1100,9 +1100,10 @@ IPC_BEGIN_MESSAGES(Automation) IPC::AttachExternalTabParams) // Sent when the automation client connects to an existing tab. - IPC_SYNC_MESSAGE_ROUTED2_3(AutomationMsg_ConnectExternalTab, + IPC_SYNC_MESSAGE_ROUTED3_3(AutomationMsg_ConnectExternalTab, uint64 /* cookie */, bool /* allow/block tab*/, + gfx::NativeWindow /* parent window */, gfx::NativeWindow /* Tab container window */, gfx::NativeWindow /* Tab window */, int /* Handle to the new tab */) diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 1629147..bace790 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -778,7 +778,8 @@ void ExternalTabUITestMockClient::ConnectToExternalTab(gfx::NativeWindow parent, int tab_handle = 0; IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, - attach_params.cookie, true, &tab_container, &tab_window, &tab_handle); + attach_params.cookie, true, NULL, &tab_container, &tab_window, + &tab_handle); channel_->Send(message); RECT rect; |