Index: ui/views/animation/square_ink_drop_ripple.cc |
diff --git a/ui/views/animation/square_ink_drop_ripple.cc b/ui/views/animation/square_ink_drop_ripple.cc |
index ffa339e3f815beab4c1e24418b6972a00ae508f7..64def3348ec3f48bb8847b8f74bba7ef6088d172 100644 |
--- a/ui/views/animation/square_ink_drop_ripple.cc |
+++ b/ui/views/animation/square_ink_drop_ripple.cc |
@@ -451,10 +451,10 @@ void SquareInkDropRipple::AnimateCenterPoint( |
animation.SetTweenType(tween); |
gfx::Transform transform; |
transform.Translate(target_center_point_.x(), target_center_point_.y()); |
- ui::LayerAnimationElement* element = |
+ std::unique_ptr<ui::LayerAnimationElement> element = |
ui::LayerAnimationElement::CreateTransformElement(transform, duration); |
ui::LayerAnimationSequence* sequence = |
- new ui::LayerAnimationSequence(element); |
+ new ui::LayerAnimationSequence(std::move(element)); |
if (observer) |
sequence->AddObserver(observer); |
@@ -473,11 +473,11 @@ void SquareInkDropRipple::AnimateToTransforms( |
ui::ScopedLayerAnimationSettings animation(animator); |
animation.SetPreemptionStrategy(preemption_strategy); |
animation.SetTweenType(tween); |
- ui::LayerAnimationElement* element = |
+ std::unique_ptr<ui::LayerAnimationElement> element = |
ui::LayerAnimationElement::CreateTransformElement(transforms[i], |
duration); |
ui::LayerAnimationSequence* sequence = |
- new ui::LayerAnimationSequence(element); |
+ new ui::LayerAnimationSequence(std::move(element)); |
if (animation_observer) |
sequence->AddObserver(animation_observer); |
@@ -505,10 +505,10 @@ void SquareInkDropRipple::AnimateToOpacity( |
ui::ScopedLayerAnimationSettings animation_settings(animator); |
animation_settings.SetPreemptionStrategy(preemption_strategy); |
animation_settings.SetTweenType(tween); |
- ui::LayerAnimationElement* animation_element = |
+ std::unique_ptr<ui::LayerAnimationElement> animation_element = |
ui::LayerAnimationElement::CreateOpacityElement(opacity, duration); |
ui::LayerAnimationSequence* animation_sequence = |
- new ui::LayerAnimationSequence(animation_element); |
+ new ui::LayerAnimationSequence(std::move(animation_element)); |
if (animation_observer) |
animation_sequence->AddObserver(animation_observer); |