Chromium Code Reviews| Index: ui/views/controls/button/label_button.h |
| diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h |
| index 6228ab2b26d2c66aa1379a730c9e972aedcf452d..e00a2a66ba886955489bca2c967475e02c89c440 100644 |
| --- a/ui/views/controls/button/label_button.h |
| +++ b/ui/views/controls/button/label_button.h |
| @@ -5,6 +5,7 @@ |
| #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| +#include <array> |
| #include <memory> |
| #include "base/compiler_specific.h" |
| @@ -150,6 +151,13 @@ class VIEWS_EXPORT LabelButton : public CustomButton, |
| // NativeThemeDelegate: |
| gfx::Rect GetThemePaintRect() const override; |
| + std::array<bool, STATE_COUNT> explicitly_set_colors() const { |
|
Evan Stade
2017/01/09 20:02:30
should this return a const ref
Tom (Use chromium acct)
2017/01/09 20:31:50
Done.
|
| + return explicitly_set_colors_; |
| + } |
| + void set_explicitly_set_colors(std::array<bool, STATE_COUNT> colors) { |
|
Evan Stade
2017/01/09 20:02:30
const ref
Tom (Use chromium acct)
2017/01/09 20:31:50
Done.
|
| + explicitly_set_colors_ = colors; |
| + } |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init); |
| FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label); |
| @@ -204,7 +212,7 @@ class VIEWS_EXPORT LabelButton : public CustomButton, |
| SkColor button_state_colors_[STATE_COUNT]; |
| // Used to track whether SetTextColor() has been invoked. |
| - bool explicitly_set_colors_[STATE_COUNT]; |
| + std::array<bool, STATE_COUNT> explicitly_set_colors_; |
| // |min_size_| increases monotonically with the preferred size. |
| mutable gfx::Size min_size_; |