| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 void SetCallToAction(bool cta); | 33 void SetCallToAction(bool cta); |
| 34 | 34 |
| 35 // LabelButton: | 35 // LabelButton: |
| 36 void Layout() override; | 36 void Layout() override; |
| 37 void OnFocus() override; | 37 void OnFocus() override; |
| 38 void OnBlur() override; | 38 void OnBlur() override; |
| 39 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 39 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 40 SkColor GetInkDropBaseColor() const override; | 40 SkColor GetInkDropBaseColor() const override; |
| 41 bool ShouldShowInkDropForFocus() const override; | 41 bool ShouldShowInkDropForFocus() const override; |
| 42 void SetEnabledTextColors(SkColor color) override; |
| 42 void UpdateStyleToIndicateDefaultStatus() override; | 43 void UpdateStyleToIndicateDefaultStatus() override; |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 MdTextButton(ButtonListener* listener); | 46 MdTextButton(ButtonListener* listener); |
| 46 ~MdTextButton() override; | 47 ~MdTextButton() override; |
| 47 | 48 |
| 48 void UpdateColorsFromNativeTheme(); | 49 void UpdateColors(); |
| 49 | 50 |
| 50 // The MD-style focus ring. This is not done via a FocusPainter | 51 // The MD-style focus ring. This is not done via a FocusPainter |
| 51 // because it needs to paint to a layer so it can extend beyond the bounds of | 52 // because it needs to paint to a layer so it can extend beyond the bounds of |
| 52 // |this|. | 53 // |this|. |
| 53 views::View* focus_ring_; | 54 views::View* focus_ring_; |
| 54 | 55 |
| 55 // The call to action style for this button. | 56 // The call to action style for this button. |
| 56 bool cta_; | 57 bool cta_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(MdTextButton); | 59 DISALLOW_COPY_AND_ASSIGN(MdTextButton); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace views | 62 } // namespace views |
| 62 | 63 |
| 63 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ | 64 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ |
| OLD | NEW |