| 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 30 matching lines...) Expand all Loading... |
| 41 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 41 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 42 std::unique_ptr<InkDrop> CreateInkDrop() override; | 42 std::unique_ptr<InkDrop> CreateInkDrop() override; |
| 43 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 43 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 44 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 44 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 45 const override; | 45 const override; |
| 46 SkColor GetInkDropBaseColor() const override; | 46 SkColor GetInkDropBaseColor() const override; |
| 47 void SetEnabledTextColors(SkColor color) override; | 47 void SetEnabledTextColors(SkColor color) override; |
| 48 void SetText(const base::string16& text) override; | 48 void SetText(const base::string16& text) override; |
| 49 void AdjustFontSize(int size_delta) override; | 49 void AdjustFontSize(int size_delta) override; |
| 50 void UpdateStyleToIndicateDefaultStatus() override; | 50 void UpdateStyleToIndicateDefaultStatus() override; |
| 51 void StateChanged() override; | 51 void StateChanged(ButtonState old_state) override; |
| 52 | 52 |
| 53 protected: | 53 protected: |
| 54 // LabelButton: | 54 // LabelButton: |
| 55 void SetFontList(const gfx::FontList& font_list) override; | 55 void SetFontList(const gfx::FontList& font_list) override; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 explicit MdTextButton(ButtonListener* listener); | 58 explicit MdTextButton(ButtonListener* listener); |
| 59 | 59 |
| 60 void UpdatePadding(); | 60 void UpdatePadding(); |
| 61 void UpdateColors(); | 61 void UpdateColors(); |
| 62 | 62 |
| 63 // True if this button uses prominent styling (blue fill, etc.). | 63 // True if this button uses prominent styling (blue fill, etc.). |
| 64 bool is_prominent_; | 64 bool is_prominent_; |
| 65 | 65 |
| 66 // When set, this provides the background color. | 66 // When set, this provides the background color. |
| 67 base::Optional<SkColor> bg_color_override_; | 67 base::Optional<SkColor> bg_color_override_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(MdTextButton); | 69 DISALLOW_COPY_AND_ASSIGN(MdTextButton); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace views | 72 } // namespace views |
| 73 | 73 |
| 74 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 74 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| OLD | NEW |