Index: ash/rotator/window_rotation.cc |
diff --git a/ash/rotator/window_rotation.cc b/ash/rotator/window_rotation.cc |
index 2ee5d8f7c4350470da41e6c5ae4a3304ceea5342..a4123273e7ce512586387a694858b087a4fa8949 100644 |
--- a/ash/rotator/window_rotation.cc |
+++ b/ash/rotator/window_rotation.cc |
@@ -76,29 +76,30 @@ void WindowRotation::InitTransform(ui::Layer* layer) { |
current_transform.TransformPoint(&new_pivot); |
current_transform.TransformPoint(&new_origin_); |
- std::unique_ptr<ui::InterpolatedTransform> rotation( |
- new ui::InterpolatedTransformAboutPivot( |
- old_pivot, new ui::InterpolatedRotation(0, degrees_))); |
+ std::unique_ptr<ui::InterpolatedTransform> rotation = |
+ base::MakeUnique<ui::InterpolatedTransformAboutPivot>( |
+ old_pivot, base::MakeUnique<ui::InterpolatedRotation>(0, degrees_)); |
- std::unique_ptr<ui::InterpolatedTransform> translation( |
- new ui::InterpolatedTranslation( |
+ std::unique_ptr<ui::InterpolatedTransform> translation = |
+ base::MakeUnique<ui::InterpolatedTranslation>( |
gfx::PointF(), gfx::PointF(new_pivot.x() - old_pivot.x(), |
- new_pivot.y() - old_pivot.y()))); |
+ new_pivot.y() - old_pivot.y())); |
float scale_factor = 0.9f; |
- std::unique_ptr<ui::InterpolatedTransform> scale_down( |
- new ui::InterpolatedScale(1.0f, scale_factor, 0.0f, 0.5f)); |
+ std::unique_ptr<ui::InterpolatedTransform> scale_down = |
+ base::MakeUnique<ui::InterpolatedScale>(1.0f, scale_factor, 0.0f, 0.5f); |
- std::unique_ptr<ui::InterpolatedTransform> scale_up( |
- new ui::InterpolatedScale(1.0f, 1.0f / scale_factor, 0.5f, 1.0f)); |
+ std::unique_ptr<ui::InterpolatedTransform> scale_up = |
+ base::MakeUnique<ui::InterpolatedScale>(1.0f, 1.0f / scale_factor, 0.5f, |
+ 1.0f); |
interpolated_transform_.reset( |
new ui::InterpolatedConstantTransform(current_transform)); |
- scale_up->SetChild(scale_down.release()); |
- translation->SetChild(scale_up.release()); |
- rotation->SetChild(translation.release()); |
- interpolated_transform_->SetChild(rotation.release()); |
+ scale_up->SetChild(std::move(scale_down)); |
+ translation->SetChild(std::move(scale_up)); |
+ rotation->SetChild(std::move(translation)); |
+ interpolated_transform_->SetChild(std::move(rotation)); |
} |
void WindowRotation::OnStart(ui::LayerAnimationDelegate* delegate) {} |