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

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: addressed comment 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..0a93db34263bcbd1796497b4d9cfdded3c99e7b5 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1048,8 +1048,12 @@ 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,
+ // Update the bookmark state, since the BrowserWindow may query it during
+ // OnActiveTabChanged() below.
+ 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 +1107,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