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

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: Updated 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: 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 924770abf7b36e0c3785a9cfc55258a6638a9337..01de362ffd03e575e62e5d340cb4883d562bbf9b 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -193,10 +193,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