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

Unified Diff: ui/gfx/render_text.h

Issue 8044004: Clean up of SelectionModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: add comment about 'next' in ReplaceTextInternal Created 9 years, 2 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 | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
===================================================================
--- ui/gfx/render_text.h (revision 103984)
+++ ui/gfx/render_text.h (working copy)
@@ -100,10 +100,6 @@
size_t GetCursorPosition() const;
void SetCursorPosition(size_t position);
- void SetCaretPlacement(SelectionModel::CaretPlacement placement) {
- selection_model_.set_caret_placement(placement);
- }
-
// Moves the cursor left or right. Cursor movement is visual, meaning that
// left and right are relative to screen, not the directionality of the text.
// If |select| is false, the selection start is moved to the same position.
@@ -123,6 +119,13 @@
// Returns true if the cursor position or selection range changed.
bool MoveCursorTo(const Point& point, bool select);
+ // Set the selection_model_ based on |range|.
+ // If the |range| start or end is greater than text length, it is modified
+ // to be the text length.
+ // If the |range| start or end is not a cursorable position (not on grapheme
+ // boundary), it is a NO-OP and returns false. Otherwise, returns true.
+ bool SelectRange(const ui::Range& range);
+
size_t GetSelectionStart() const {
return selection_model_.selection_start();
}
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698