| Index: ui/views/controls/label.h
|
| diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
|
| index 463afac9d40d5c6cbe9741b92ecded872de09852..0964b036c511fd8c15f27d3e96a37213aebd278c 100644
|
| --- a/ui/views/controls/label.h
|
| +++ b/ui/views/controls/label.h
|
| @@ -132,6 +132,14 @@ 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 text as displayed to the user, respecting the 'obscured' flag.
|
| + const base::string16& layout_text() const { return layout_text_; }
|
| +
|
| // 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);
|
| @@ -213,6 +221,10 @@ class VIEWS_EXPORT Label : public View {
|
| // Calls ComputeDrawStringFlags().
|
| FRIEND_TEST_ALL_PREFIXES(LabelTest, DisableSubpixelRendering);
|
|
|
| + // Sets both |text_| and |layout_text_| to appropriate values, taking
|
| + // the label's 'obscured' status into account.
|
| + void SetTextInternal(const base::string16& text);
|
| +
|
| void Init(const base::string16& text, const gfx::FontList& font_list);
|
|
|
| void RecalculateColors();
|
| @@ -239,6 +251,7 @@ class VIEWS_EXPORT Label : public View {
|
| bool ShouldShowDefaultTooltip() const;
|
|
|
| base::string16 text_;
|
| + base::string16 layout_text_;
|
| gfx::FontList font_list_;
|
| SkColor requested_enabled_color_;
|
| SkColor actual_enabled_color_;
|
| @@ -256,6 +269,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_;
|
|
|