| 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();
|
|
|