Index: views/controls/textfield/textfield_views_model.h |
diff --git a/views/controls/textfield/textfield_views_model.h b/views/controls/textfield/textfield_views_model.h |
index de7e5204cb4f286f67f977c0e23cdbc05bb32ec5..fd5a9da447766314274d661a44880d76e674e2db 100644 |
--- a/views/controls/textfield/textfield_views_model.h |
+++ b/views/controls/textfield/textfield_views_model.h |
@@ -34,6 +34,13 @@ class Edit; |
struct TextStyleRange; |
+// C++ doesn't allow forward decl enum, so let's define here. |
+enum MergeType { |
+ DONT_MERGE, |
msw
2011/06/02 10:16:42
nit: rename DO_NOT_MERGE, the DONT contraction wit
oshima
2011/06/02 19:11:42
Done.
|
+ MERGEABLE, |
+ MERGE_WITH_PREVIOUS, |
+}; |
+ |
} // namespace internal |
typedef std::vector<internal::TextStyleRange*> TextStyleRanges; |
@@ -313,10 +320,13 @@ class TextfieldViewsModel { |
// Executes and records edit operations. |
void ExecuteAndRecordDelete(size_t from, size_t to, bool mergeable); |
- void ExecuteAndRecordReplace(const string16& text, bool mergeable); |
- void ExecuteAndRecordReplaceAt(const string16& text, |
- size_t at, |
- bool mergeable); |
+ void ExecuteAndRecordReplaceSelection(internal::MergeType merge_type, |
+ const string16& text); |
+ void ExecuteAndRecordReplace(internal::MergeType merge_type, |
+ size_t old_cursor_pos, |
+ size_t new_cursor_pos, |
+ const string16& text, |
+ size_t new_text_start); |
void ExecuteAndRecordInsert(const string16& text, bool mergeable); |
// Adds or merge |edit| into edit history. Return true if the edit |