Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 11827060: Ensure "Press Tab to search" is never displayed when instant extended is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered Scott's comments. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 3f224585b0cde19ce60cb9e40bf5772087c1c460..7e317aa603858620e35ab6e67a93b89038d2cfb8 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -211,13 +211,18 @@ void OmniboxEditModel::SetInstantSuggestion(
view_->SetInstantSuggestion(suggestion.text);
break;
- case INSTANT_COMPLETE_REPLACE:
+ case INSTANT_COMPLETE_REPLACE: {
+ const bool save_original_selection = !has_temporary_text_;
view_->SetInstantSuggestion(string16());
has_temporary_text_ = true;
is_temporary_text_set_by_instant_ = true;
- view_->SetWindowTextAndCaretPos(suggestion.text, suggestion.text.size(),
- false, false);
+ // Instant suggestions are never a keyword.
+ keyword_ = string16();
+ is_keyword_hint_ = false;
+ view_->OnTemporaryTextMaybeChanged(suggestion.text,
+ save_original_selection);
break;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698