summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamarth@chromium.org <samarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-31 16:41:39 +0000
committersamarth@chromium.org <samarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-31 16:41:39 +0000
commitf0c48e76161a05089c191c11e31250da51fab75d (patch)
tree62e3e0f53aa21fe4d685d35bdf696315b32b04c1
parent37c0d0af79c5d621dca5cb38807e1ba06986b8e0 (diff)
downloadchromium_src-f0c48e76161a05089c191c11e31250da51fab75d.zip
chromium_src-f0c48e76161a05089c191c11e31250da51fab75d.tar.gz
chromium_src-f0c48e76161a05089c191c11e31250da51fab75d.tar.bz2
Merge 202966 "InstantExtended: better handling of switching betw..."
> InstantExtended: better handling of switching between tab and overlay. > > This fixes two issues: > 1) Set use_tab_for_suggestions_ at the end of OnAutocompleteStart so that it > doesn't get overridden by calls to HideOverlay. > 2) If not using tab for suggestions, make sure the overlay is ready to use. > > BUG=241835 > > Review URL: https://chromiumcodereview.appspot.com/15755011 TBR=samarth@chromium.org Review URL: https://codereview.chromium.org/16256005 git-svn-id: svn://svn.chromium.org/chrome/branches/1500/src@203419 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/search/instant_controller.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index ecd1ac5..448e2a7 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -263,14 +263,12 @@ InstantController::~InstantController() {
}
void InstantController::OnAutocompleteStart() {
- if (instant_tab_ && instant_tab_->supports_instant()) {
+ if (UseTabForSuggestions() && instant_tab_->supports_instant()) {
LOG_INSTANT_DEBUG_EVENT(
this, "OnAutocompleteStart: using InstantTab");
return;
}
- use_tab_for_suggestions_ = false;
-
// Not using |instant_tab_|. Check if overlay is OK to use.
if (ShouldSwitchToLocalOverlay()) {
ResetOverlay(GetLocalInstantURL());
@@ -280,6 +278,7 @@ void InstantController::OnAutocompleteStart() {
LOG_INSTANT_DEBUG_EVENT(
this, "OnAutocompleteStart: using existing overlay");
}
+ use_tab_for_suggestions_ = false;
}
bool InstantController::Update(const AutocompleteMatch& match,