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 #ifndef UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ | 5 #ifndef UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ | 6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "third_party/skia/include/core/SkColor.h" | 13 #include "third_party/skia/include/core/SkColor.h" |
14 #include "ui/compositor/layer.h" | 14 #include "ui/compositor/layer.h" |
15 #include "ui/compositor/layer_animator.h" | 15 #include "ui/compositor/layer_animator.h" |
16 #include "ui/gfx/animation/tween.h" | 16 #include "ui/gfx/animation/tween.h" |
17 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
18 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
19 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
20 #include "ui/views/animation/ink_drop_animation.h" | 20 #include "ui/views/animation/ink_drop_animation.h" |
21 #include "ui/views/animation/ink_drop_state.h" | 21 #include "ui/views/animation/ink_drop_state.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 // Maximum size that an ink drop will be drawn to for any InkDropState whose | 157 // Maximum size that an ink drop will be drawn to for any InkDropState whose |
158 // final frame should be small. | 158 // final frame should be small. |
159 gfx::Size small_size_; | 159 gfx::Size small_size_; |
160 | 160 |
161 // Corner radius used to draw the rounded rectangles corner for any | 161 // Corner radius used to draw the rounded rectangles corner for any |
162 // InkDropState whose final frame should be small. | 162 // InkDropState whose final frame should be small. |
163 int small_corner_radius_; | 163 int small_corner_radius_; |
164 | 164 |
165 // ui::LayerDelegate to paint circles for all the circle layers. | 165 // ui::LayerDelegate to paint circles for all the circle layers. |
166 scoped_ptr<CircleLayerDelegate> circle_layer_delegate_; | 166 std::unique_ptr<CircleLayerDelegate> circle_layer_delegate_; |
167 | 167 |
168 // ui::LayerDelegate to paint rectangles for all the rectangle layers. | 168 // ui::LayerDelegate to paint rectangles for all the rectangle layers. |
169 scoped_ptr<RectangleLayerDelegate> rect_layer_delegate_; | 169 std::unique_ptr<RectangleLayerDelegate> rect_layer_delegate_; |
170 | 170 |
171 // The root layer that parents the animating layers. The root layer is used to | 171 // The root layer that parents the animating layers. The root layer is used to |
172 // manipulate opacity and location, and its children are used to manipulate | 172 // manipulate opacity and location, and its children are used to manipulate |
173 // the different painted shapes that compose the ink drop. | 173 // the different painted shapes that compose the ink drop. |
174 ui::Layer root_layer_; | 174 ui::Layer root_layer_; |
175 | 175 |
176 // ui::Layers for all of the painted shape layers that compose the ink drop. | 176 // ui::Layers for all of the painted shape layers that compose the ink drop. |
177 scoped_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT]; | 177 std::unique_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT]; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(SquareInkDropAnimation); | 179 DISALLOW_COPY_AND_ASSIGN(SquareInkDropAnimation); |
180 }; | 180 }; |
181 | 181 |
182 } // namespace views | 182 } // namespace views |
183 | 183 |
184 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ | 184 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_ANIMATION_H_ |
OLD | NEW |