| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 332016db7727acfe8adaab524d6eb037dc94077f..a5e9f432d9dfe97dd6252c48e6de8190758d4f4b 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -59,6 +59,7 @@
|
| #include "chrome/browser/file_select_helper.h"
|
| #include "chrome/browser/first_run/first_run.h"
|
| #include "chrome/browser/google/google_url_tracker.h"
|
| +#include "chrome/browser/instant/instant_controller.h"
|
| #include "chrome/browser/lifetime/application_lifetime.h"
|
| #include "chrome/browser/net/url_fixer_upper.h"
|
| #include "chrome/browser/notifications/notification_ui_manager.h"
|
| @@ -1007,7 +1008,7 @@ void Browser::TabDeactivated(WebContents* contents) {
|
| window_->GetLocationBar()->SaveStateToContents(contents);
|
|
|
| if (instant_controller_)
|
| - instant_controller_->TabDeactivated(contents);
|
| + instant_controller_->instant()->TabDeactivated(contents);
|
| }
|
|
|
| void Browser::ActiveTabChanged(WebContents* old_contents,
|
| @@ -1079,7 +1080,7 @@ void Browser::ActiveTabChanged(WebContents* old_contents,
|
|
|
| // This needs to be called after UpdateSearchState().
|
| if (instant_controller_)
|
| - instant_controller_->ActiveTabChanged();
|
| + instant_controller_->instant()->ActiveTabChanged();
|
| }
|
|
|
| void Browser::TabMoved(WebContents* contents,
|
| @@ -1223,18 +1224,15 @@ void Browser::ShowFirstRunBubble() {
|
| window()->GetLocationBar()->ShowFirstRunBubble();
|
| }
|
|
|
| -void Browser::MaybeUpdateBookmarkBarStateForInstantOverlay(
|
| - const chrome::search::Mode& mode) {
|
| +void Browser::MaybeUpdateBookmarkBarStateForInstantOverlay() {
|
| // This is invoked by a platform-specific implementation of
|
| // |InstantOverlayController| to update bookmark bar state according to
|
| // Instant overlay state.
|
| // ModeChanged() updates bookmark bar state for all mode transitions except
|
| // when new mode is |SEARCH_SUGGESTIONS|, because that needs to be done when
|
| // the suggestions are ready.
|
| - if (mode.is_search_suggestions() &&
|
| - bookmark_bar_state_ == BookmarkBar::SHOW) {
|
| + if (bookmark_bar_state_ == BookmarkBar::SHOW)
|
| UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
|
| - }
|
| }
|
|
|
| void Browser::ShowDownload(content::DownloadItem* download) {
|
| @@ -1826,6 +1824,9 @@ void Browser::ModeChanged(const chrome::search::Mode& old_mode,
|
| return;
|
| }
|
| UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
|
| +
|
| + if (instant_controller_)
|
| + instant_controller_->instant()->SearchModeChanged(old_mode, new_mode);
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|