diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 18:16:05 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 18:16:05 +0000 |
commit | 48fcc73051f66d6cb1bd729bc2061862e0c152da (patch) | |
tree | 2bac3309b58de9fc83dad34632e654d50e52057d /chrome/browser/views | |
parent | 7cf57d179a8fe9e01affac36af4b9494bd59bf89 (diff) | |
download | chromium_src-48fcc73051f66d6cb1bd729bc2061862e0c152da.zip chromium_src-48fcc73051f66d6cb1bd729bc2061862e0c152da.tar.gz chromium_src-48fcc73051f66d6cb1bd729bc2061862e0c152da.tar.bz2 |
Removed focus manager references from the external tab container as we don't need the focus manager to achieve tabbing in and out of the chrome frame widget.
The other change is to add a check for a NULL container window when the tab contents is being freed.
This causes an assert to fire in the focus manager code while trying to unsubclass the window.
Review URL: http://codereview.chromium.org/119074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/tab_contents/native_tab_contents_container_win.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc index 42a4357..8dccc4c 100644 --- a/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc +++ b/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc @@ -42,16 +42,18 @@ void NativeTabContentsContainerWin::DetachContents(TabContents* contents) { // TODO(brettw) should this move to NativeViewHost::Detach which is called below? // It needs cleanup regardless. HWND container_hwnd = contents->GetNativeView(); + if (container_hwnd) { + // Hide the contents before adjusting its parent to avoid a full desktop + // flicker. + ShowWindow(container_hwnd, SW_HIDE); - // Hide the contents before adjusting its parent to avoid a full desktop - // flicker. - ShowWindow(container_hwnd, SW_HIDE); + // Reset the parent to NULL to ensure hidden tabs don't receive messages. + ::SetParent(container_hwnd, NULL); - // Reset the parent to NULL to ensure hidden tabs don't receive messages. - ::SetParent(container_hwnd, NULL); + // Unregister the tab contents window from the FocusManager. + views::FocusManager::UninstallFocusSubclass(container_hwnd); + } - // Unregister the tab contents window from the FocusManager. - views::FocusManager::UninstallFocusSubclass(container_hwnd); HWND hwnd = contents->GetContentNativeView(); if (hwnd) { // We may not have an HWND anymore, if the renderer crashed and we are |