| OLD | NEW |
| 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 DestroyLayer(); |
| 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 |
| OLD | NEW |