diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 06:10:00 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 06:10:00 +0000 |
commit | 6d03fd1d5f678c0aa12668aad69156d448ed92c3 (patch) | |
tree | f55e2e37152cbc9ae65b34ece8fadfbd692ad0fb /chrome/browser/views | |
parent | abfad64fbef99f056908a664bc3dc6c97dce74d6 (diff) | |
download | chromium_src-6d03fd1d5f678c0aa12668aad69156d448ed92c3.zip chromium_src-6d03fd1d5f678c0aa12668aad69156d448ed92c3.tar.gz chromium_src-6d03fd1d5f678c0aa12668aad69156d448ed92c3.tar.bz2 |
RootView should be destroyed in WM_NCDESTROY not after it.
Review URL: http://codereview.chromium.org/12632
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index ccbb950..40b0d3b 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -629,16 +629,10 @@ void BrowserView::Observe(NotificationType type, // BrowserView, TabStripModelObserver implementation: void BrowserView::TabDetachedAt(TabContents* contents, int index) { - // We use index here rather than comparing |contents| because by this time - // the model has already removed |contents| from its list, so - // browser_->GetSelectedTabContents() will return NULL or something else. - if (index == browser_->tabstrip_model()->selected_index()) { - // We need to reset the current tab contents to NULL before it gets - // freed. This is because the focus manager performs some operations - // on the selected TabContents when it is removed. - infobar_container_->ChangeTabContents(NULL); - contents_container_->SetTabContents(NULL); - } + // We need to break the TabContentsContainerView's attachment to whatever HWND + // it's hosting since if the window is destroyed it'll try to hide it even + // after the new window has parented it. + contents_container_->SetTabContents(NULL); } void BrowserView::TabSelectedAt(TabContents* old_contents, |