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

Unified Diff: ash/common/shelf/overflow_button.h

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed OnClickCanceled Created 4 years, 4 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: ash/common/shelf/overflow_button.h
diff --git a/ash/common/shelf/overflow_button.h b/ash/common/shelf/overflow_button.h
index 7f77ea3c6527906d3ca39cc4b32fca81cdcce58f..c15039b19e731a11c4b9d6317003affabb99ba78 100644
--- a/ash/common/shelf/overflow_button.h
+++ b/ash/common/shelf/overflow_button.h
@@ -21,15 +21,18 @@ class OverflowButton : public views::CustomButton {
~OverflowButton() override;
void OnShelfAlignmentChanged();
+ void OnOverflowBubbleShown();
+ void OnOverflowBubbleHidden();
// Sets alpha value of the background and schedules a paint.
void SetBackgroundAlpha(int alpha);
private:
- // views::View:
- void OnPaint(gfx::Canvas* canvas) override;
-
// views::CustomButton:
+ void OnPaint(gfx::Canvas* canvas) override;
+ std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
+ bool ShouldEnterPushedState(const ui::Event& event) override;
+ bool ShouldShowInkDropHighlight() const override;
void NotifyClick(const ui::Event& event) override;
// Helper functions to paint the background and foreground of the button
@@ -41,10 +44,10 @@ class OverflowButton : public views::CustomButton {
// current shelf state.
// TODO(tdanderson): Remove this once the material design shelf is enabled
// by default. See crbug.com/614453.
- int NonMaterialBackgroundImageId();
+ int NonMaterialBackgroundImageId() const;
// Calculates the bounds of the overflow button based on the shelf alignment.
- gfx::Rect CalculateButtonBounds();
+ gfx::Rect CalculateButtonBounds() const;
// Used for bottom shelf alignment. |bottom_image_| points to
// |bottom_image_md_| for material design, otherwise it is points to a

Powered by Google App Engine
This is Rietveld 408576698