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

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

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: address comments Created 3 years, 11 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 InkDropContainerView::InkDropContainerView() {} 9 InkDropContainerView::InkDropContainerView() {}
10 10
11 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) { 11 void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
12 SetPaintToLayer(true); 12 SetPaintToLayer();
13 SetVisible(true); 13 SetVisible(true);
14 layer()->SetFillsBoundsOpaquely(false); 14 layer()->SetFillsBoundsOpaquely(false);
15 layer()->Add(ink_drop_layer); 15 layer()->Add(ink_drop_layer);
16 } 16 }
17 17
18 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 18 void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
19 layer()->Remove(ink_drop_layer); 19 layer()->Remove(ink_drop_layer);
20 SetVisible(false); 20 SetVisible(false);
21 SetPaintToLayer(false); 21 DetachLayer();
22 } 22 }
23 23
24 bool InkDropContainerView::CanProcessEventsWithinSubtree() const { 24 bool InkDropContainerView::CanProcessEventsWithinSubtree() const {
25 // Ensure the container View is found as the EventTarget instead of this. 25 // Ensure the container View is found as the EventTarget instead of this.
26 return false; 26 return false;
27 } 27 }
28 28
29 } // namespace views 29 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698