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

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

Issue 11414303: Make Google Search autocomplete provider cursor aware. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years 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/ui/omnibox/omnibox_edit_model.h
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h
index 6caf62f542932a94b4d3cbe564454c88cc6574c4..b7deb39bec18d36cc44c21e16ead5b084b7632dc 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -418,6 +418,10 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
// autocomplete text that has not yet been accepted.
string16 user_text_;
+ // The 0-based position of the cursor within |user_text_| or string16::npos
+ // if unknown or past the last character.
+ size_t cursor_position_;
Peter Kasting 2012/12/05 20:49:38 I don't think we need to track this as a member (o
Bart N. 2012/12/06 21:43:32 Great suggestion, thanks! I wonder why it is end r
Peter Kasting 2012/12/06 22:16:35 Well, think about how you create a selection (with
+
// We keep track of when the user began modifying the omnibox text.
// This should be valid whenever user_input_in_progress_ is true.
base::TimeTicks time_user_first_modified_omnibox_;

Powered by Google App Engine
This is Rietveld 408576698