Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: ui/views/controls/button/md_text_button.h

Issue 2383243002: Refactor MdFocusRing to make it easier to reuse on other controls. (Closed)
Patch Set: explicit onfocus Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/button/md_text_button.h
diff --git a/ui/views/controls/button/md_text_button.h b/ui/views/controls/button/md_text_button.h
index fde4ff92d9d7cb45de46ef6545526c53f3a8d539..91aec104c1b75fdda10a11c92e967e2ccc279278 100644
--- a/ui/views/controls/button/md_text_button.h
+++ b/ui/views/controls/button/md_text_button.h
@@ -12,10 +12,6 @@
namespace views {
-namespace internal {
-class MdFocusRing;
-} // namespace internal
-
// A button class that implements the Material Design text button spec.
class VIEWS_EXPORT MdTextButton : public LabelButton {
public:
@@ -33,7 +29,6 @@ class VIEWS_EXPORT MdTextButton : public LabelButton {
void set_bg_color_override(SkColor color) { bg_color_override_ = color; }
// LabelButton:
- void Layout() override;
void OnFocus() override;
void OnBlur() override;
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
@@ -59,10 +54,8 @@ class VIEWS_EXPORT MdTextButton : public LabelButton {
void UpdatePadding();
void UpdateColors();
- // The MD-style focus ring. This is not done via a FocusPainter
- // because it needs to paint to a layer so it can extend beyond the bounds of
- // |this|.
- internal::MdFocusRing* focus_ring_;
+ // A child that indicates focus.
+ View* focus_ring_;
// True if this button uses prominent styling (blue fill, etc.).
bool is_prominent_;

Powered by Google App Engine
This is Rietveld 408576698