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

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: 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 7229b5872b8edab1725d8e7ffc6eeefa7fedeb0d..99120b647773f58688eaee3873548a6f8150586c 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -212,11 +212,15 @@ void OmniboxEditModel::SetInstantSuggestion(
break;
case INSTANT_COMPLETE_REPLACE:
+ const bool save_original_selection = !has_temporary_text_;
sky 2013/01/11 00:15:57 nit: use {} since you're adding a variable only fo
beaudoin 2013/01/13 20:02:39 Done.
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