| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const base::string16& text); | 23 const base::string16& text); |
| 24 static MdTextButton* Create(ButtonListener* listener, | 24 static MdTextButton* Create(ButtonListener* listener, |
| 25 const base::string16& text); | 25 const base::string16& text); |
| 26 | 26 |
| 27 // See |is_prominent_|. | 27 // See |is_prominent_|. |
| 28 void SetProminent(bool is_prominent); | 28 void SetProminent(bool is_prominent); |
| 29 | 29 |
| 30 // See |bg_color_override_|. | 30 // See |bg_color_override_|. |
| 31 void SetBgColorOverride(const base::Optional<SkColor>& color); | 31 void SetBgColorOverride(const base::Optional<SkColor>& color); |
| 32 | 32 |
| 33 // View: |
| 34 void OnPaintBackground(gfx::Canvas* canvas) override; |
| 35 |
| 33 // LabelButton: | 36 // LabelButton: |
| 34 void OnFocus() override; | 37 void OnFocus() override; |
| 35 void OnBlur() override; | 38 void OnBlur() override; |
| 36 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 39 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 37 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 40 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 38 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 41 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 39 const override; | 42 const override; |
| 40 SkColor GetInkDropBaseColor() const override; | 43 SkColor GetInkDropBaseColor() const override; |
| 41 bool ShouldShowInkDropForFocus() const override; | 44 bool ShouldShowInkDropForFocus() const override; |
| 42 void SetEnabledTextColors(SkColor color) override; | 45 void SetEnabledTextColors(SkColor color) override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 61 | 64 |
| 62 // When set, this provides the background color. | 65 // When set, this provides the background color. |
| 63 base::Optional<SkColor> bg_color_override_; | 66 base::Optional<SkColor> bg_color_override_; |
| 64 | 67 |
| 65 DISALLOW_COPY_AND_ASSIGN(MdTextButton); | 68 DISALLOW_COPY_AND_ASSIGN(MdTextButton); |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 } // namespace views | 71 } // namespace views |
| 69 | 72 |
| 70 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 73 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| OLD | NEW |