| 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 28 matching lines...) Expand all Loading... |
| 39 SkAlpha alpha); | 39 SkAlpha alpha); |
| 40 | 40 |
| 41 void SetCallToAction(bool cta); | 41 void SetCallToAction(bool cta); |
| 42 void set_bg_color_override(SkColor color) { bg_color_override_ = color; } | 42 void set_bg_color_override(SkColor color) { bg_color_override_ = color; } |
| 43 | 43 |
| 44 // LabelButton: | 44 // LabelButton: |
| 45 void Layout() override; | 45 void Layout() override; |
| 46 void OnFocus() override; | 46 void OnFocus() override; |
| 47 void OnBlur() override; | 47 void OnBlur() override; |
| 48 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 48 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 49 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 49 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 50 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 50 const override; | 51 const override; |
| 51 SkColor GetInkDropBaseColor() const override; | 52 SkColor GetInkDropBaseColor() const override; |
| 52 bool ShouldShowInkDropForFocus() const override; | 53 bool ShouldShowInkDropForFocus() const override; |
| 53 void SetEnabledTextColors(SkColor color) override; | 54 void SetEnabledTextColors(SkColor color) override; |
| 55 void SetText(const base::string16& text) override; |
| 54 void AdjustFontSize(int size_delta) override; | 56 void AdjustFontSize(int size_delta) override; |
| 55 void UpdateStyleToIndicateDefaultStatus() override; | 57 void UpdateStyleToIndicateDefaultStatus() override; |
| 56 | 58 |
| 57 protected: | 59 protected: |
| 58 // LabelButton: | 60 // LabelButton: |
| 59 void SetFontList(const gfx::FontList& font_list) override; | 61 void SetFontList(const gfx::FontList& font_list) override; |
| 60 | 62 |
| 61 private: | 63 private: |
| 62 MdTextButton(ButtonListener* listener); | 64 MdTextButton(ButtonListener* listener); |
| 63 ~MdTextButton() override; | 65 ~MdTextButton() override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 75 | 77 |
| 76 // When set, this provides the background color. | 78 // When set, this provides the background color. |
| 77 base::Optional<SkColor> bg_color_override_; | 79 base::Optional<SkColor> bg_color_override_; |
| 78 | 80 |
| 79 DISALLOW_COPY_AND_ASSIGN(MdTextButton); | 81 DISALLOW_COPY_AND_ASSIGN(MdTextButton); |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace views | 84 } // namespace views |
| 83 | 85 |
| 84 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 86 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| OLD | NEW |