Chromium Code Reviews| Index: ui/views/controls/label.h |
| diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h |
| index 463afac9d40d5c6cbe9741b92ecded872de09852..5aac282d0e801710e47f36e27f19dae18293146e 100644 |
| --- a/ui/views/controls/label.h |
| +++ b/ui/views/controls/label.h |
| @@ -132,6 +132,15 @@ class VIEWS_EXPORT Label : public View { |
| bool is_multi_line() const { return is_multi_line_; } |
| void SetMultiLine(bool multi_line); |
| + // Get or set if the label text should be obscured before rendering (e.g. |
| + // should "Password!" display as "*********"); default is false. |
| + bool is_obscured() const { return is_obscured_; } |
| + void SetObscured(bool obscured); |
| + |
| + // Get the label text as displayed to the user, respecting the 'obscured' |
|
msw
2014/04/03 01:38:48
nit: drop the word "label" for a one-line comment.
Mike West
2014/04/03 08:17:25
Done.
|
| + // flag. |
| + const base::string16& display_text() const; |
|
msw
2014/04/03 01:38:48
nit: non-inlined functions should have CamelCaseNa
Mike West
2014/04/03 08:17:25
Done.
|
| + |
| // Sets whether the label text can be split on words. |
| // Default is false. This only works when is_multi_line is true. |
| void SetAllowCharacterBreak(bool allow_character_break); |
| @@ -239,6 +248,7 @@ class VIEWS_EXPORT Label : public View { |
| bool ShouldShowDefaultTooltip() const; |
| base::string16 text_; |
| + base::string16 obscured_text_; |
|
msw
2014/04/03 01:38:48
nit: Call this |layout_text| to be consistent with
Mike West
2014/04/03 08:17:25
Done.
|
| gfx::FontList font_list_; |
| SkColor requested_enabled_color_; |
| SkColor actual_enabled_color_; |
| @@ -256,6 +266,7 @@ class VIEWS_EXPORT Label : public View { |
| mutable bool text_size_valid_; |
| int line_height_; |
| bool is_multi_line_; |
| + bool is_obscured_; |
| bool allow_character_break_; |
| ElideBehavior elide_behavior_; |
| gfx::HorizontalAlignment horizontal_alignment_; |