OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "ui/gfx/geometry/point.h" | 11 #include "ui/gfx/geometry/point.h" |
12 #include "ui/views/views_export.h" | 12 #include "ui/views/views_export.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 class Layer; | 15 class Layer; |
16 } // namespace ui | 16 } // namespace ui |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 class InkDropRipple; | 20 class InkDropRipple; |
21 class InkDropHover; | 21 class InkDropHighlight; |
22 | 22 |
23 // Used by the InkDrop to add and remove the ink drop layers from a host's layer | 23 // Used by the InkDrop to add and remove the ink drop layers from a host's layer |
24 // tree. Typically the ink drop layer is added to a View's layer but it can also | 24 // tree. Typically the ink drop layer is added to a View's layer but it can also |
25 // be added to a View's ancestor layer. | 25 // be added to a View's ancestor layer. |
26 // | 26 // |
27 // Note: Some Views do not own a Layer, but you can use | 27 // Note: Some Views do not own a Layer, but you can use |
28 // View::SetLayer(new ui::Layer(ui::LAYER_NOT_DRAWN)) to force the View to have | 28 // View::SetLayer(new ui::Layer(ui::LAYER_NOT_DRAWN)) to force the View to have |
29 // a lightweight Layer that can parent the ink drop layer. | 29 // a lightweight Layer that can parent the ink drop layer. |
30 class VIEWS_EXPORT InkDropHost { | 30 class VIEWS_EXPORT InkDropHost { |
31 public: | 31 public: |
32 InkDropHost() {} | 32 InkDropHost() {} |
33 virtual ~InkDropHost() {} | 33 virtual ~InkDropHost() {} |
34 | 34 |
35 // Adds the |ink_drop_layer| in to a visible layer tree. | 35 // Adds the |ink_drop_layer| in to a visible layer tree. |
36 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0; | 36 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0; |
37 | 37 |
38 // Removes |ink_drop_layer| from the layer tree. | 38 // Removes |ink_drop_layer| from the layer tree. |
39 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0; | 39 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0; |
40 | 40 |
41 // Creates and returns the effect used for press. | 41 // Creates and returns the effect used for press. |
42 virtual std::unique_ptr<InkDropRipple> CreateInkDropRipple() const = 0; | 42 virtual std::unique_ptr<InkDropRipple> CreateInkDropRipple() const = 0; |
43 | 43 |
44 // Creates and returns the effect used for hover. | 44 // Creates and returns the effect used for hover. |
bruthig
2016/06/03 02:50:46
Replace 'hover' with 'highlight' or 'hover/focus'.
Evan Stade
2016/06/03 03:01:41
Done.
| |
45 virtual std::unique_ptr<InkDropHover> CreateInkDropHover() const = 0; | 45 virtual std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const = 0; |
46 | 46 |
47 private: | 47 private: |
48 DISALLOW_COPY_AND_ASSIGN(InkDropHost); | 48 DISALLOW_COPY_AND_ASSIGN(InkDropHost); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace views | 51 } // namespace views |
52 | 52 |
53 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ | 53 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
OLD | NEW |