Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2328)

Unified Diff: chrome/browser/ui/browser.cc

Issue 25500003: fix to show detached bookmark bar on NTP when "Show bookmarks bar" is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 27063591eaff6a99d18dc3f44283e1efa81fdfc7..121492de6cd75db7fa0d317949f6ecd9371ba07e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1048,8 +1048,16 @@ void Browser::ActiveTabChanged(WebContents* old_contents,
int reason) {
content::RecordAction(UserMetricsAction("ActiveTabChanged"));
- // First let the BrowserWindow do its handling. On e.g. views this changes
- // the focused object, which should happen before we update the toolbar below,
+ // First, determine the new bookmark state, so that it can be queried by
+ // BrowserWindow::BookmarkBarStateChanged() when it's invoked from
+ // BrowserWindow::OnActiveTabChanged() below.
+ // Note that UpdateBookmarkBarState() won't invoke
+ // BrowserWindow::BookmarkBarStateChanged() for
+ // BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH reason.
Peter Kasting 2013/10/01 20:44:11 Nit: Can we just say: Update the bookmark bar sta
kuan 2013/10/02 00:15:37 Done.
+ UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH);
+
+ // Let the BrowserWindow do its handling. On e.g. views this changes the
+ // focused object, which should happen before we update the toolbar below,
// since the omnibox expects the correct element to already be focused when it
// is updated.
window_->OnActiveTabChanged(old_contents, new_contents, index, reason);
@@ -1103,8 +1111,6 @@ void Browser::ActiveTabChanged(WebContents* old_contents,
tab_strip_model_->active_index());
}
- UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH);
-
// This needs to be called after UpdateSearchState().
if (instant_controller_)
instant_controller_->ActiveTabChanged();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698