| Index: ui/gfx/render_text.h
|
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
|
| index 018f7d3088847090016b69e01ef25267ccdb6f80..a7ea9e698c3a4522b174346e917f78aa12c5ec42 100644
|
| --- a/ui/gfx/render_text.h
|
| +++ b/ui/gfx/render_text.h
|
| @@ -275,6 +275,9 @@ class UI_EXPORT RenderText {
|
|
|
| void Draw(Canvas* canvas);
|
|
|
| + // Draws a cursor at |position|.
|
| + void DrawCursor(Canvas* canvas, const SelectionModel& position);
|
| +
|
| // Draw the selected text without a cursor or selection highlight.
|
| void DrawSelectedText(Canvas* canvas);
|
|
|
| @@ -316,6 +319,12 @@ class UI_EXPORT RenderText {
|
| // chosen.
|
| virtual std::vector<FontSpan> GetFontSpansForTesting() = 0;
|
|
|
| + // A convenience function to check whether the glyph attached to the caret
|
| + // is within the given range.
|
| + static bool RangeContainsCaret(const ui::Range& range,
|
| + size_t caret_pos,
|
| + LogicalCursorDirection caret_affinity);
|
| +
|
| protected:
|
| RenderText();
|
|
|
| @@ -419,12 +428,6 @@ class UI_EXPORT RenderText {
|
| // Applies text shadows to |renderer|.
|
| void ApplyTextShadows(internal::SkiaTextRenderer* renderer);
|
|
|
| - // A convenience function to check whether the glyph attached to the caret
|
| - // is within the given range.
|
| - static bool RangeContainsCaret(const ui::Range& range,
|
| - size_t caret_pos,
|
| - LogicalCursorDirection caret_affinity);
|
| -
|
| private:
|
| friend class RenderTextTest;
|
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyle);
|
| @@ -449,9 +452,8 @@ class UI_EXPORT RenderText {
|
| // cursor is within the visible display area.
|
| void UpdateCachedBoundsAndOffset();
|
|
|
| - // Draw the selection and cursor.
|
| + // Draw the selection.
|
| void DrawSelection(Canvas* canvas);
|
| - void DrawCursor(Canvas* canvas);
|
|
|
| // Logical UTF-16 string data to be drawn.
|
| string16 text_;
|
|
|