| Index: chrome/browser/ui/browser.cc
|
| ===================================================================
|
| --- chrome/browser/ui/browser.cc (revision 224205)
|
| +++ chrome/browser/ui/browser.cc (working copy)
|
| @@ -1053,6 +1053,22 @@
|
| int reason) {
|
| content::RecordAction(UserMetricsAction("ActiveTabChanged"));
|
|
|
| + // Switch the find bar to the new tab if necessary. This must be done before
|
| + // changing focus for unittests to pass.
|
| + // TODO(pkasting): http://crbug.com/297385 Move this to near the end of this
|
| + // function (where it used to be) once the find bar properly restores
|
| + // selections across tab changes.
|
| + if (HasFindBarController()) {
|
| + find_bar_controller_->ChangeWebContents(new_contents);
|
| + find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
|
| + }
|
| +
|
| + // 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);
|
| +
|
| // Discarded tabs always get reloaded.
|
| if (tab_strip_model_->IsTabDiscarded(index)) {
|
| LOG(WARNING) << "Reloading discarded tab at " << index;
|
| @@ -1088,11 +1104,6 @@
|
| tab_strip_model_->GetActiveWebContents())->GetStatusText());
|
| }
|
|
|
| - if (HasFindBarController()) {
|
| - find_bar_controller_->ChangeWebContents(new_contents);
|
| - find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
|
| - }
|
| -
|
| // Update sessions. Don't force creation of sessions. If sessions doesn't
|
| // exist, the change will be picked up by sessions when created.
|
| SessionService* session_service =
|
|
|