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

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

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed CanProcessEventsWithinSubtree Created 3 years, 7 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
« no previous file with comments | « ui/views/animation/ink_drop.h ('k') | ui/views/animation/ink_drop_host_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/animation/ink_drop_observer.h"
8
7 namespace views { 9 namespace views {
8 10
11 InkDrop::~InkDrop() {}
12
13 void InkDrop::AddObserver(InkDropObserver* observer) {
14 CHECK(observer);
15 observers_.AddObserver(observer);
16 }
17
18 void InkDrop::RemoveObserver(InkDropObserver* observer) {
19 CHECK(observer);
20 observers_.RemoveObserver(observer);
21 }
22
23 InkDrop::InkDrop() {}
24
25 void InkDrop::NotifyInkDropAnimationStarted() {
26 for (InkDropObserver& observer : observers_)
27 observer.InkDropAnimationStarted();
28 }
29
9 InkDropContainerView::InkDropContainerView() {} 30 InkDropContainerView::InkDropContainerView() {}
10 31
11 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) { 32 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
12 SetPaintToLayer(); 33 SetPaintToLayer();
13 SetVisible(true); 34 SetVisible(true);
14 layer()->SetFillsBoundsOpaquely(false); 35 layer()->SetFillsBoundsOpaquely(false);
15 layer()->Add(ink_drop_layer); 36 layer()->Add(ink_drop_layer);
16 } 37 }
17 38
18 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 39 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
19 layer()->Remove(ink_drop_layer); 40 layer()->Remove(ink_drop_layer);
20 SetVisible(false); 41 SetVisible(false);
21 DestroyLayer(); 42 DestroyLayer();
22 } 43 }
23 44
24 bool InkDropContainerView::CanProcessEventsWithinSubtree() const { 45 bool InkDropContainerView::CanProcessEventsWithinSubtree() const {
25 // Ensure the container View is found as the EventTarget instead of this. 46 // Ensure the container View is found as the EventTarget instead of this.
26 return false; 47 return false;
27 } 48 }
28 49
29 } // namespace views 50 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop.h ('k') | ui/views/animation/ink_drop_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698