Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index ae24c8abdb62a14bc6c738f68de3ac250f9b6727..7718abc15b4d1ec8a41d5d53d4f97fd89b3f4f2e 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/instant/search.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/net/url_fixer_upper.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); |
samarth
2013/03/11 19:03:24
I always found the fact that BrowserInstantControl
|
} |
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); |
} |
/////////////////////////////////////////////////////////////////////////////// |