summaryrefslogtreecommitdiffstats
path: root/views/controls/textfield/native_textfield_gtk.cc
diff options
context:
space:
mode:
authorxji@google.com <xji@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 20:03:45 +0000
committerxji@google.com <xji@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 20:03:45 +0000
commit67e85519340234bbf3e3981caa8d68e4663aff07 (patch)
tree7cdffd782898ecc01232ac6f6c9406d9725690cf /views/controls/textfield/native_textfield_gtk.cc
parent679a41d1084397c7ca9cdd7956ed2edbf9aa0784 (diff)
downloadchromium_src-67e85519340234bbf3e3981caa8d68e4663aff07.zip
chromium_src-67e85519340234bbf3e3981caa8d68e4663aff07.tar.gz
chromium_src-67e85519340234bbf3e3981caa8d68e4663aff07.tar.bz2
1. change the setters of gfx::SelectionModel to be private. Set one alone might make SelectionModel into un-stable state, which should not be allowed.
2. Removing SelectionModel(size_t, size_t) constructor. Introduce RenderText::SelectRange(const ui::Range&) to handle range. 3. revert removal of SelectRange/GetSelectedRange in r103188. BUG=90426 TEST=view_unittests. Review URL: http://codereview.chromium.org/8044004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/textfield/native_textfield_gtk.cc')
-rw-r--r--views/controls/textfield/native_textfield_gtk.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/views/controls/textfield/native_textfield_gtk.cc b/views/controls/textfield/native_textfield_gtk.cc
index 9fe5784c..b4a98f8 100644
--- a/views/controls/textfield/native_textfield_gtk.cc
+++ b/views/controls/textfield/native_textfield_gtk.cc
@@ -249,12 +249,20 @@ bool NativeTextfieldGtk::IsIMEComposing() const {
return false;
}
-void NativeTextfieldGtk::GetSelectionModel(gfx::SelectionModel* sel) const {
+void NativeTextfieldGtk::GetSelectedRange(ui::Range* range) const {
gint start_pos;
gint end_pos;
gtk_editable_get_selection_bounds(
GTK_EDITABLE(native_view()), &start_pos, &end_pos);
- *sel = gfx::SelectionModel(start_pos, end_pos);
+ *range = ui::Range(start_pos, end_pos);
+}
+
+void NativeTextfieldGtk::SelectRange(const ui::Range& range) {
+ NOTREACHED();
+}
+
+void NativeTextfieldGtk::GetSelectionModel(gfx::SelectionModel* sel) const {
+ NOTREACHED();
}
void NativeTextfieldGtk::SelectSelectionModel(const gfx::SelectionModel& sel) {