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

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..c37d78fba2c37a7a3d0cab7e3aec93d985dd4160 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -220,14 +220,16 @@ bool InkDropHostView::ShouldShowInkDropForFocus() const {
return false;
}
-void InkDropHostView::SetHasInkDrop(bool has_an_ink_drop) {
- if (has_an_ink_drop) {
+void InkDropHostView::SetHasInkDrop(InkDropType ink_drop_type) {
+ if (ink_drop_type == NO_INK_DROP)
+ ink_drop_.reset(new InkDropStub());
+ else
ink_drop_.reset(new InkDropImpl(this));
+
+ if (ink_drop_type == INK_DROP_WITH_GESTURE_HANDLING)
gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
- } else {
+ else
gesture_handler_.reset();
- ink_drop_.reset(new InkDropStub());
- }
}
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698