| 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 "ui/views/controls/button/label_button.h" | 10 #include "ui/views/controls/button/label_button.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // LabelButton: | 42 // LabelButton: |
| 43 void Layout() override; | 43 void Layout() override; |
| 44 void OnFocus() override; | 44 void OnFocus() override; |
| 45 void OnBlur() override; | 45 void OnBlur() override; |
| 46 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 46 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 47 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 47 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 48 const override; | 48 const override; |
| 49 SkColor GetInkDropBaseColor() const override; | 49 SkColor GetInkDropBaseColor() const override; |
| 50 bool ShouldShowInkDropForFocus() const override; | 50 bool ShouldShowInkDropForFocus() const override; |
| 51 void SetEnabledTextColors(SkColor color) override; |
| 51 void UpdateStyleToIndicateDefaultStatus() override; | 52 void UpdateStyleToIndicateDefaultStatus() override; |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 MdTextButton(ButtonListener* listener); | 55 MdTextButton(ButtonListener* listener); |
| 55 ~MdTextButton() override; | 56 ~MdTextButton() override; |
| 56 | 57 |
| 57 void UpdateColorsFromNativeTheme(); | 58 void UpdateColors(); |
| 58 | 59 |
| 59 // The MD-style focus ring. This is not done via a FocusPainter | 60 // The MD-style focus ring. This is not done via a FocusPainter |
| 60 // because it needs to paint to a layer so it can extend beyond the bounds of | 61 // because it needs to paint to a layer so it can extend beyond the bounds of |
| 61 // |this|. | 62 // |this|. |
| 62 internal::MdFocusRing* focus_ring_; | 63 internal::MdFocusRing* focus_ring_; |
| 63 | 64 |
| 64 // True if this button uses call-to-action styling. | 65 // True if this button uses call-to-action styling. |
| 65 bool is_cta_; | 66 bool is_cta_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(MdTextButton); | 68 DISALLOW_COPY_AND_ASSIGN(MdTextButton); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace views | 71 } // namespace views |
| 71 | 72 |
| 72 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 73 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| OLD | NEW |