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

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: Addressed review comments 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 e6b1e424155d41e75056cdf1744fc2e7e2684fcc..2014f19560ae4bbf5d9429dc17e60675906d5009 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -221,10 +221,20 @@ bool InkDropHostView::ShouldShowInkDropForFocus() const {
}
void InkDropHostView::SetHasInkDrop(bool has_an_ink_drop) {
+ bool handles_gesture_event = has_an_ink_drop;
+ SetHasInkDrop(has_an_ink_drop, handles_gesture_event);
+}
+
+void InkDropHostView::SetHasInkDrop(bool has_an_ink_drop,
+ bool handles_gesture_event) {
if (has_an_ink_drop) {
ink_drop_.reset(new InkDropImpl(this));
- gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
+ if (handles_gesture_event)
+ gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
+ else
+ gesture_handler_.reset();
} else {
+ DCHECK(!handles_gesture_event);
gesture_handler_.reset();
ink_drop_.reset(new InkDropStub());
}

Powered by Google App Engine
This is Rietveld 408576698