1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
8 #include "base/macros.h"
9 #include "ui/views/views_export.h"
17 // Used by the InkDropAnimationController to add and remove the ink drop layers
18 // from a host's layer tree. Typically the ink drop layer is added to a View's
19 // layer but it can also be added to a View's ancestor layer.
21 // Note: Some Views do not own a Layer, but you can use
22 // View::SetLayer(new ui::Layer(ui::LAYER_NOT_DRAWN)) to force the View to have
23 // a lightweight Layer that can parent the ink drop layer.
24 class VIEWS_EXPORT InkDropHost
{
27 virtual ~InkDropHost() {}
29 // Add the |ink_drop_layer| in to a visible layer tree.
30 virtual void AddInkDropLayer(ui::Layer
* ink_drop_layer
) = 0;
32 // Removes |ink_drop_layer| from the layer tree.
33 virtual void RemoveInkDropLayer(ui::Layer
* ink_drop_layer
) = 0;
36 DISALLOW_COPY_AND_ASSIGN(InkDropHost
);
41 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_