diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 17:30:58 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 17:30:58 +0000 |
commit | 6e47f2fed00e86f7579e040c2e02cb747a95913b (patch) | |
tree | ad5c153a2246b2c821ae415ec10ba06f96587ad1 /chrome/browser | |
parent | b5558cf212f53fb81dbcbe522b5b2eede5d4641b (diff) | |
download | chromium_src-6e47f2fed00e86f7579e040c2e02cb747a95913b.zip chromium_src-6e47f2fed00e86f7579e040c2e02cb747a95913b.tar.gz chromium_src-6e47f2fed00e86f7579e040c2e02cb747a95913b.tar.bz2 |
ChromeFrame would leave chrome processes running if a page rendered in Chrome would open up a popup window which
opened up in IE. This is because of an orphan external tab container created to handle the popup. This tab is destroyed
in the normal case when the active document window is destroyed, which is the parent of the external tab container.
However in this case the active document is destroyed without its window being created thus resulting in the external tab
container lying around which holds a reference to the automation provider.
Fix is to pass the ChromeFrameAutomationClient window as the parent window in the AutomationMsg_ConnectExternalTab
message.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=48732
Bug=48732
Covered by ChromeFrame test FullTabNavigationTest.JavascriptWindowOpenDifferentDomain
Review URL: http://codereview.chromium.org/2911006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-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 |
4 files changed, 11 insertions, 3 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 |