| Index: chrome/browser/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
|
| index ab139df57683deea8c76b0955919d303ad250e48..d22e5e50524acd6c34750747b3f83421bbd23d9b 100644
|
| --- a/chrome/browser/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/cocoa/browser_window_controller.mm
|
| @@ -1103,35 +1103,31 @@ willPositionSheet:(NSWindow*)sheet
|
|
|
| // Update various elements that are interested in knowing the current
|
| // TabContents.
|
| -#if 0
|
| -// TODO(pinkerton):Update as more things become window-specific
|
| - contents_container_->SetTabContents(newContents);
|
| -#endif
|
|
|
| // Update all the UI bits.
|
| windowShim_->UpdateTitleBar();
|
|
|
| -#if 0
|
| -// TODO(pinkerton):Update as more things become window-specific
|
| - toolbar_->SetProfile(newContents->profile());
|
| - UpdateToolbar(newContents, true);
|
| - UpdateUIForContents(newContents);
|
| -#endif
|
| -
|
| // Update the bookmark bar.
|
| [self updateBookmarkBarVisibilityWithAnimation:NO];
|
| }
|
|
|
| - (void)tabChangedWithContents:(TabContents*)contents
|
| atIndex:(NSInteger)index
|
| - loadingOnly:(BOOL)loading {
|
| + changeType:(TabStripModelObserver::TabChangeType)change {
|
| if (index == browser_->tabstrip_model()->selected_index()) {
|
| - // Update titles if this is the currently selected tab.
|
| - windowShim_->UpdateTitleBar();
|
| + // Update titles if this is the currently selected tab and if it isn't just
|
| + // the loading state which changed.
|
| + if (change != TabStripModelObserver::LOADING_ONLY)
|
| + windowShim_->UpdateTitleBar();
|
| +
|
| + // Update the bookmark bar if this is the currently selected tab and if it
|
| + // isn't just the title which changed. This for transitions between the NTP
|
| + // (showing its floating bookmark bar) and normal web pages (showing no
|
| + // bookmark bar).
|
| + // TODO(viettrungluu): perhaps update to not terminate running animations?
|
| + if (change != TabStripModelObserver::TITLE_NOT_LOADING)
|
| + [self updateBookmarkBarVisibilityWithAnimation:NO];
|
| }
|
| -
|
| - // Update the bookmark bar.
|
| - [self updateBookmarkBarVisibilityWithAnimation:NO];
|
| }
|
|
|
| - (void)userChangedTheme {
|
|
|