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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 5966006: Hitting Tab should always move cursor to end of omnibox text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build. Created 9 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
Index: chrome/browser/autocomplete/autocomplete_edit.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 54bf5ed8bd2b78301a5b0f56e0f14baa20cb419d..4e88607436461b5323f13fbdd28d9553159f8221 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -154,8 +154,16 @@ void AutocompleteEditModel::SetUserText(const string16& text) {
void AutocompleteEditModel::FinalizeInstantQuery(
const string16& input_text,
- const string16& suggest_text) {
- popup_->FinalizeInstantQuery(input_text, suggest_text);
+ const string16& suggest_text,
+ bool skip_inline_autocomplete) {
+ if (skip_inline_autocomplete) {
+ const string16 final_text = input_text + suggest_text;
+ view_->OnBeforePossibleChange();
+ view_->SetWindowTextAndCaretPos(final_text, final_text.length());
+ view_->OnAfterPossibleChange();
+ } else {
+ popup_->FinalizeInstantQuery(input_text, suggest_text);
+ }
}
void AutocompleteEditModel::GetDataForURLExport(GURL* url,
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.h ('k') | chrome/browser/autocomplete/autocomplete_edit_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698