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

Unified Diff: ash/shelf/shelf_button.h

Issue 2033553003: Add MD ink drop ripple to shelf app items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests Created 4 years, 6 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/shelf/shelf_button.h
diff --git a/ash/shelf/shelf_button.h b/ash/shelf/shelf_button.h
index 4a84a61a532d502bb5d7a60e0047ef4beea274a6..e6085d279a4b0a4df7fe6635e781b02ed67c4a4d 100644
--- a/ash/shelf/shelf_button.h
+++ b/ash/shelf/shelf_button.h
@@ -54,6 +54,9 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
// Returns the bounds of the icon.
gfx::Rect GetIconBounds() const;
+ // Called when user started dragging the shelf button.
+ void OnDragStarted();
+
// Overrides to views::CustomButton:
void ShowContextMenu(const gfx::Point& p,
ui::MenuSourceType source_type) override;
@@ -77,6 +80,12 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
// ui::EventHandler overrides:
void OnGestureEvent(ui::GestureEvent* event) override;
+ // views::CustomButton overrides:
+ 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;
+
// Sets the icon image with a shadow.
void SetShadowedImage(const gfx::ImageSkia& bitmap);

Powered by Google App Engine
This is Rietveld 408576698