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

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

Issue 2514303004: WIP - mask a view's layer by its view coordinates
Patch Set: manual clip Created 4 years, 1 month 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 b691b0f0d2dc600fd32d68d629a4cae32c593bd6..83db0d6e86621c21fe1c5c6558ed7f243f31303b 100644
--- a/ui/views/controls/button/md_text_button.h
+++ b/ui/views/controls/button/md_text_button.h
@@ -36,6 +36,13 @@ class VIEWS_EXPORT MdTextButton : public LabelButton {
void OnPaintBackground(gfx::Canvas* canvas) override;
// LabelButton:
+/*
+void OnPaint(gfx::Canvas* canvas) override;
+void PaintChildren(const ui::PaintContext& context);
+*/
+ bool GetNeedsNotificationWhenVisibleBoundsChange() const override;
+ void OnVisibleBoundsChanged() override;
+ void OnLayerBoundsChanged(const gfx::Rect& old_bounds) override;
void OnFocus() override;
void OnBlur() override;
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
@@ -63,6 +70,10 @@ class VIEWS_EXPORT MdTextButton : public LabelButton {
// True if this button uses prominent styling (blue fill, etc.).
bool is_prominent_;
+ gfx::Rect last_visible_bounds_;
+ std::unique_ptr<ui::LayerDelegate> mask_layer_delegate_;
+ ui::Layer mask_layer_;
+
// When set, this provides the background color.
base::Optional<SkColor> bg_color_override_;

Powered by Google App Engine
This is Rietveld 408576698