Chromium Code Reviews| Index: ui/gfx/render_text.h |
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
| index db98b846057abbc7a8a0b63e0b1f7ce81953b3a6..6d9b23093c99345916ad34c7271099697698a7ef 100644 |
| --- a/ui/gfx/render_text.h |
| +++ b/ui/gfx/render_text.h |
| @@ -135,6 +135,10 @@ class UI_EXPORT RenderText { |
| // Get the first font in |font_list_|. |
| const Font& GetFont() const; |
| + // Like text() except that it returns asterisks or bullets if this is an |
| + // obscured field. |
| + string16 GetDisplayText() const; |
|
xji
2012/02/18 01:28:47
change to protected.
benrg
2012/02/24 19:07:44
Done.
|
| + |
| const SelectionModel& selection_model() const { return selection_model_; } |
| bool cursor_enabled() const { return cursor_enabled_; } |
| @@ -152,6 +156,10 @@ class UI_EXPORT RenderText { |
| const StyleRange& default_style() const { return default_style_; } |
| void set_default_style(const StyleRange& style) { default_style_ = style; } |
| + // In an obscured (password) field, all text is drawn as asterisks or bullets. |
| + bool is_obscured() const { return obscured_; } |
| + void SetObscured(bool obscured); |
| + |
| const Rect& display_rect() const { return display_rect_; } |
| void SetDisplayRect(const Rect& r); |
| @@ -410,6 +418,9 @@ class UI_EXPORT RenderText { |
| // The default text style. |
| StyleRange default_style_; |
| + // True if this is an obscured (password) field. |
| + bool obscured_; |
| + |
| // Fade text head and/or tail, if text doesn't fit into |display_rect_|. |
| bool fade_head_; |
| bool fade_tail_; |