Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index 9fb6151697bf12b04fd6739792f595f283f0a2df..4234e4da18387ff56427f275eb987dbe879447d3 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -37,6 +37,12 @@ struct SkPoint; |
class SkShader; |
class SkTypeface; |
+namespace base { |
+namespace i18n { |
+class BreakIterator; |
+} |
+} |
+ |
namespace gfx { |
class Canvas; |
@@ -432,6 +438,10 @@ class GFX_EXPORT RenderText { |
const std::vector<internal::Line>& lines() const { return lines_; } |
void set_lines(std::vector<internal::Line>* lines) { lines_.swap(*lines); } |
+ base::i18n::BreakIterator* grapheme_iterator() { |
+ return grapheme_iterator_.get(); |
msw
2014/07/25 00:37:00
nit: fix indent
ckocagil
2014/07/29 23:13:41
Done.
|
+ } |
+ |
// Returns the baseline of the current text. The return value depends on |
// the text and its layout while the return value of GetBaseline() doesn't. |
// GetAlignmentOffset() takes into account the difference between them. |
@@ -705,6 +715,9 @@ class GFX_EXPORT RenderText { |
// ResetLayout and on |display_rect_| changes. |
std::vector<internal::Line> lines_; |
+ // ICU grapheme iterator for the layout text. Can be NULL in case of an error. |
+ scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_; |
msw
2014/07/25 00:37:00
Move this to RenderTextHarfBuzz if it's only used
ckocagil
2014/07/29 23:13:41
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(RenderText); |
}; |