From f1cd5e88af6f0d088d7b90a8f4b69da63aa994af Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Fri, 23 Oct 2009 17:19:03 +0000 Subject: Makes inactive pinned tabs on linux throb when the title changes. I need to resolve with Glen/Nicholas how to handle the windows side. BUG=25308 TEST=none Review URL: http://codereview.chromium.org/314010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29903 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/tabs/tab_overview_controller.cc | 2 +- chrome/browser/views/tabs/tab_overview_controller.h | 2 +- chrome/browser/views/tabs/tab_strip.cc | 11 +++++++++-- chrome/browser/views/tabs/tab_strip.h | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'chrome/browser/views/tabs') diff --git a/chrome/browser/views/tabs/tab_overview_controller.cc b/chrome/browser/views/tabs/tab_overview_controller.cc index 91e9dd6..ac5a251 100644 --- a/chrome/browser/views/tabs/tab_overview_controller.cc +++ b/chrome/browser/views/tabs/tab_overview_controller.cc @@ -279,7 +279,7 @@ void TabOverviewController::TabMoved(TabContents* contents, } void TabOverviewController::TabChangedAt(TabContents* contents, int index, - bool loading_only) { + TabChangeType change_type) { ConfigureCell(grid_->GetTabOverviewCellAt(index), index); } diff --git a/chrome/browser/views/tabs/tab_overview_controller.h b/chrome/browser/views/tabs/tab_overview_controller.h index b71ba71..4fc2cf8 100644 --- a/chrome/browser/views/tabs/tab_overview_controller.h +++ b/chrome/browser/views/tabs/tab_overview_controller.h @@ -93,7 +93,7 @@ class TabOverviewController : public TabStripModelObserver { int to_index, bool pinned_state_changed); virtual void TabChangedAt(TabContents* contents, int index, - bool loading_only); + TabChangeType change_type); virtual void TabStripEmpty(); // Currently don't care about these as we're not rendering the selection. virtual void TabDeselectedAt(TabContents* contents, int index) { } diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index d94aa9a..d2fd993 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -1076,11 +1076,18 @@ void TabStrip::TabMoved(TabContents* contents, int from_index, int to_index, } void TabStrip::TabChangedAt(TabContents* contents, int index, - bool loading_only) { + TabChangeType change_type) { // Index is in terms of the model. Need to make sure we adjust that index in // case we have an animation going. Tab* tab = GetTabAtAdjustForAnimation(index); - tab->UpdateData(contents, loading_only); + if (change_type == TITLE_NOT_LOADING) { + // TODO(sky): make this work. + // if (tab->is_pinned() && !tab->IsSelected()) + // tab->StartPinnedTabTitleAnimation(); + // We'll receive another notification of the change asynchronously. + return; + } + tab->UpdateData(contents, change_type == LOADING_ONLY); tab->UpdateFromModel(); } diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h index c84527a..e16a6573 100644 --- a/chrome/browser/views/tabs/tab_strip.h +++ b/chrome/browser/views/tabs/tab_strip.h @@ -102,7 +102,7 @@ class TabStrip : public views::View, virtual void TabMoved(TabContents* contents, int from_index, int to_index, bool pinned_state_changed); virtual void TabChangedAt(TabContents* contents, int index, - bool loading_only); + TabChangeType change_type); virtual void TabPinnedStateChanged(TabContents* contents, int index); // Tab::Delegate implementation: -- cgit v1.1