| Index: chrome/browser/views/frame/browser_view.cc
|
| ===================================================================
|
| --- chrome/browser/views/frame/browser_view.cc (revision 30243)
|
| +++ chrome/browser/views/frame/browser_view.cc (working copy)
|
| @@ -1247,8 +1247,8 @@
|
| // 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.
|
| + contents_container_->ChangeTabContents(NULL);
|
| infobar_container_->ChangeTabContents(NULL);
|
| - contents_container_->ChangeTabContents(NULL);
|
| UpdateDevToolsForContents(NULL);
|
| }
|
| }
|
| @@ -1269,8 +1269,22 @@
|
|
|
| // Update various elements that are interested in knowing the current
|
| // TabContents.
|
| +
|
| + // When we toggle the NTP floating bookmarks bar,
|
| + // we don't want any TabContents to be attached, so that we
|
| + // avoid an unnecessary resize and re-layout of a TabContents.
|
| + contents_container_->ChangeTabContents(NULL);
|
| +
|
| infobar_container_->ChangeTabContents(new_contents);
|
| +
|
| + // Update all the UI bits.
|
| + UpdateTitleBar();
|
| + toolbar_->SetProfile(new_contents->profile());
|
| + UpdateToolbar(new_contents, true);
|
| + UpdateUIForContents(new_contents);
|
| +
|
| contents_container_->ChangeTabContents(new_contents);
|
| +
|
| UpdateDevToolsForContents(new_contents);
|
| // TODO(beng): This should be called automatically by ChangeTabContents, but I
|
| // am striving for parity now rather than cleanliness. This is
|
| @@ -1283,12 +1297,6 @@
|
| // handlers when we are eventually shown.
|
| new_contents->view()->RestoreFocus();
|
| }
|
| -
|
| - // Update all the UI bits.
|
| - UpdateTitleBar();
|
| - toolbar_->SetProfile(new_contents->profile());
|
| - UpdateToolbar(new_contents, true);
|
| - UpdateUIForContents(new_contents);
|
| }
|
|
|
| void BrowserView::TabStripEmpty() {
|
|
|