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

Unified Diff: ui/views/animation/ink_drop_host_view.h

Issue 2070143003: Add MD ink drop ripple to app list button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b612539_shelf_button_ripple
Patch Set: Changed SetHasInkDrop to SetInkDropMode 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: ui/views/animation/ink_drop_host_view.h
diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h
index 030faa810d10a889f644f2e14113771b12b4f14a..440fed4436b98b85ccaaf4de7729ce46014fed3d 100644
--- a/ui/views/animation/ink_drop_host_view.h
+++ b/ui/views/animation/ink_drop_host_view.h
@@ -38,6 +38,16 @@ class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost {
void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; }
protected:
+ // Used in SetInkDropMode() to specify whether the ink drop effect is enabled
+ // or not for the view. In case of having an ink drop, it also specifies
+ // whether the default gesture event handler for the ink drop should be
+ // installed or the subclass will handle gesture events itself.
+ enum InkDropMode {
+ NO_INK_DROP,
+ INK_DROP_WITHOUT_GESTURE_HANDLING,
+ INK_DROP_WITH_GESTURE_HANDLING,
sky 2016/06/30 00:35:34 Sorry, one concern I have in looking at the change
mohsen 2016/06/30 08:54:07 Having two separate functions makes the code a bit
+ };
+
static const int kInkDropSmallCornerRadius;
void set_ink_drop_visible_opacity(float visible_opacity) {
@@ -84,7 +94,7 @@ class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost {
// Toggle to enable/disable an InkDrop on this View. Descendants can override
// CreateInkDropHighlight() and CreateInkDropRipple() to change the look/feel
// of the InkDrop.
- void SetHasInkDrop(bool has_an_ink_drop);
+ void SetInkDropMode(InkDropMode ink_drop_mode);
private:
class InkDropGestureHandler;

Powered by Google App Engine
This is Rietveld 408576698