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

Unified Diff: views/controls/textfield/textfield.h

Issue 7067015: An edit for SetText needs to be merged with previous edit for omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 7 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: views/controls/textfield/textfield.h
diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h
index 9a688fc7bd8246ab8f59b25b04d305780ad4b787..4f28aaa857e91b6fdc9a1f869dda3a39fbac9453 100644
--- a/views/controls/textfield/textfield.h
+++ b/views/controls/textfield/textfield.h
@@ -74,8 +74,13 @@ class Textfield : public View {
// field is created, using StyleFlags.
bool IsMultiLine() const;
- // Gets/Sets the text currently displayed in the Textfield.
+ // Gets the text currently displayed in the Textfield.
const string16& text() const { return text_; }
+
+ // Sets the text currently displayed in the Textfield. This doesn't
+ // change the cursor position if the current cursor is within the
+ // new text's range, or moves the cursor to the end if the cursor is
+ // our of range.
msw 2011/06/02 10:16:42 'is ou*t* of *the new text's* range'? Perhaps just
oshima 2011/06/02 19:11:42 Done.
void SetText(const string16& text);
// Appends the given string to the previously-existing text in the field.
@@ -209,6 +214,9 @@ class Textfield : public View {
// wrapper is created.
void ClearAllTextStyles();
+ // Clears Edit history.
+ void ClearEditHistory();
+
// Set the accessible name of the text field.
void SetAccessibleName(const string16& name);

Powered by Google App Engine
This is Rietveld 408576698