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

Unified Diff: components/omnibox/browser/omnibox_edit_model.h

Issue 2435103002: Omnibox: Preserve display text and select all on a focus search (Closed)
Patch Set: Use display_text.length() as caret pos for KEYBOARD_SHORTCUT Created 4 years, 2 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: components/omnibox/browser/omnibox_edit_model.h
diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h
index a15df90669a9cbdbb7ef6b1b61d6af3a9dde208d..261f137d1ba15369f2a38448a62cc670fe2ec576 100644
--- a/components/omnibox/browser/omnibox_edit_model.h
+++ b/components/omnibox/browser/omnibox_edit_model.h
@@ -177,7 +177,8 @@ class OmniboxEditModel {
// no user input in progress).
void Revert();
- // Directs the popup to start autocomplete.
+ // Directs the popup to start autocomplete. Makes use of the |view_| text and
+ // selection, so make sure to set those before calling StartAutocomplete().
void StartAutocomplete(bool has_selected_text,
bool prevent_inline_autocomplete);
@@ -244,7 +245,9 @@ class OmniboxEditModel {
bool AcceptKeyword(KeywordModeEntryMethod entry_method);
// Sets the current keyword to that of the user's default search provider and
- // updates the view so the user sees the keyword chip in the omnibox.
+ // updates the view so the user sees the keyword chip in the omnibox. Adjusts
+ // user_text_ and the selection based on the display text and the keyword
+ // entry method.
void EnterKeywordModeForDefaultSearchProvider(
KeywordModeEntryMethod entry_method);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | components/omnibox/browser/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698