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

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

Issue 1989893005: Undo selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_model.h
diff --git a/ui/views/controls/textfield/textfield_model.h b/ui/views/controls/textfield/textfield_model.h
index 135524e289a44035be219830cdb0e1044f7febf1..dd03710719102bf23a97053b85dacddb48dad52c 100644
--- a/ui/views/controls/textfield/textfield_model.h
+++ b/ui/views/controls/textfield/textfield_model.h
@@ -65,7 +65,7 @@ class VIEWS_EXPORT TextfieldModel {
// without worrying about messing edit history.
bool SetText(const base::string16& new_text);
- gfx::RenderText* render_text() { return render_text_.get(); }
+ gfx::RenderText* render_text() const { return render_text_.get(); }
// Inserts given |new_text| at the current cursor position.
// The current composition text will be cleared.
@@ -255,12 +255,12 @@ class VIEWS_EXPORT TextfieldModel {
// 1) Delete the string from |delete_from| to |delte_to|.
// 2) Insert the |new_text| at the index |new_text_insert_at|.
// Note that the index is after deletion.
- // 3) Move the cursor to |new_cursor_pos|.
+ // 3) Select |selection_range|.
void ModifyText(size_t delete_from,
size_t delete_to,
const base::string16& new_text,
size_t new_text_insert_at,
- size_t new_cursor_pos);
+ gfx::Range selection_range);
void ClearComposition();
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698