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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/animation/ink_drop_host_view.h" 5 #include "ui/views/animation/ink_drop_host_view.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/events/scoped_target_handler.h" 8 #include "ui/events/scoped_target_handler.h"
9 #include "ui/gfx/color_palette.h" 9 #include "ui/gfx/color_palette.h"
10 #include "ui/gfx/geometry/size_conversions.h" 10 #include "ui/gfx/geometry/size_conversions.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 SkColor InkDropHostView::GetInkDropBaseColor() const { 214 SkColor InkDropHostView::GetInkDropBaseColor() const {
215 NOTREACHED(); 215 NOTREACHED();
216 return gfx::kPlaceholderColor; 216 return gfx::kPlaceholderColor;
217 } 217 }
218 218
219 bool InkDropHostView::ShouldShowInkDropForFocus() const { 219 bool InkDropHostView::ShouldShowInkDropForFocus() const {
220 return false; 220 return false;
221 } 221 }
222 222
223 void InkDropHostView::SetHasInkDrop(bool has_an_ink_drop) { 223 void InkDropHostView::SetHasInkDrop(InkDropType ink_drop_type) {
224 if (has_an_ink_drop) { 224 if (ink_drop_type == NO_INK_DROP)
225 ink_drop_.reset(new InkDropStub());
226 else
225 ink_drop_.reset(new InkDropImpl(this)); 227 ink_drop_.reset(new InkDropImpl(this));
228
229 if (ink_drop_type == INK_DROP_WITH_GESTURE_HANDLING)
226 gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get())); 230 gesture_handler_.reset(new InkDropGestureHandler(this, ink_drop_.get()));
227 } else { 231 else
228 gesture_handler_.reset(); 232 gesture_handler_.reset();
229 ink_drop_.reset(new InkDropStub());
230 }
231 } 233 }
232 234
233 } // namespace views 235 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698