diff options
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 1 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/external_tab_container_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/external_tab_container_win.h | 3 | ||||
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 3 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 3 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 5 |
7 files changed, 18 insertions, 7 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; diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 880a645..c6d43d7 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -886,7 +886,7 @@ void ChromeFrameAutomationClient::LaunchComplete( // ExternalTab. IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, external_tab_cookie_, true, - NULL, NULL, NULL); + m_hWnd, NULL, NULL, NULL); automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); @@ -1210,7 +1210,8 @@ void ChromeFrameAutomationClient::AttachExternalTab( void ChromeFrameAutomationClient::BlockExternalTab(uint64 cookie) { // The host does not want this tab to be shown (due popup blocker). IPC::SyncMessage* message = - new AutomationMsg_ConnectExternalTab(0, cookie, false, NULL, NULL, NULL); + new AutomationMsg_ConnectExternalTab(0, cookie, false, m_hWnd, + NULL, NULL, NULL); automation_server_->SendAsAsync(message, NULL, this); } |