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

Side by Side Diff: ui/views/animation/ink_drop.cc

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Rebased and fixed tests Created 3 years, 9 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.h" 5 #include "ui/views/animation/ink_drop.h"
6 6
7 namespace views { 7 namespace views {
8 8
9 void InkDrop::SetObserver(InkDropObserver* observer) {
10 observer_ = observer;
11 }
12
9 InkDropContainerView::InkDropContainerView() {} 13 InkDropContainerView::InkDropContainerView() {}
10 14
11 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) { 15 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
12 SetPaintToLayer(); 16 SetPaintToLayer();
13 SetVisible(true); 17 SetVisible(true);
14 layer()->SetFillsBoundsOpaquely(false); 18 layer()->SetFillsBoundsOpaquely(false);
15 layer()->Add(ink_drop_layer); 19 layer()->Add(ink_drop_layer);
16 } 20 }
17 21
18 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 22 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
19 layer()->Remove(ink_drop_layer); 23 layer()->Remove(ink_drop_layer);
20 SetVisible(false); 24 SetVisible(false);
21 DestroyLayer(); 25 DestroyLayer();
22 } 26 }
23 27
24 bool InkDropContainerView::CanProcessEventsWithinSubtree() const { 28 bool InkDropContainerView::CanProcessEventsWithinSubtree() const {
25 // Ensure the container View is found as the EventTarget instead of this. 29 // Ensure the container View is found as the EventTarget instead of this.
26 return false; 30 return false;
27 } 31 }
28 32
29 } // namespace views 33 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698