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

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

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.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index 879dbc72d0a75e00b2863cc20102ea2d54245838..074377b0cd64a0809d5744cd616ce395045afb61 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -242,16 +242,19 @@ bool InkDropHostView::ShouldShowInkDropForFocus() const {
return false;
}
-void InkDropHostView::SetHasInkDrop(bool has_an_ink_drop) {
- if (has_an_ink_drop) {
+void InkDropHostView::SetInkDropMode(InkDropMode ink_drop_mode) {
+ if (ink_drop_mode == NO_INK_DROP)
+ ink_drop_.reset(new InkDropStub());
+ else
ink_drop_.reset(new InkDropImpl(this));
- if (!gesture_handler_)
- gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
- else
+
+ if (ink_drop_mode == INK_DROP_WITH_GESTURE_HANDLING) {
+ if (gesture_handler_)
gesture_handler_->SetInkDrop(ink_drop_.get());
+ else
+ gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
} else {
gesture_handler_.reset();
- ink_drop_.reset(new InkDropStub());
}
}

Powered by Google App Engine
This is Rietveld 408576698