| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_WINDOW_ROTATION_H_ | 5 #ifndef ASH_WINDOW_ROTATION_H_ |
| 6 #define ASH_WINDOW_ROTATION_H_ | 6 #define ASH_WINDOW_ROTATION_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "ui/compositor/layer_animation_element.h" | 12 #include "ui/compositor/layer_animation_element.h" |
| 12 #include "ui/gfx/geometry/point.h" | 13 #include "ui/gfx/geometry/point.h" |
| 13 | 14 |
| 14 namespace ui { | 15 namespace ui { |
| 15 class InterpolatedTransform; | 16 class InterpolatedTransform; |
| 16 class Layer; | 17 class Layer; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace aura { | 20 namespace aura { |
| 20 class RootWindow; | 21 class RootWindow; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 // Generates the intermediate transformation matrices used during the | 38 // Generates the intermediate transformation matrices used during the |
| 38 // animation. | 39 // animation. |
| 39 void InitTransform(ui::Layer* layer); | 40 void InitTransform(ui::Layer* layer); |
| 40 | 41 |
| 41 // Implementation of ui::LayerAnimationDelegate | 42 // Implementation of ui::LayerAnimationDelegate |
| 42 void OnStart(ui::LayerAnimationDelegate* delegate) override; | 43 void OnStart(ui::LayerAnimationDelegate* delegate) override; |
| 43 bool OnProgress(double t, ui::LayerAnimationDelegate* delegate) override; | 44 bool OnProgress(double t, ui::LayerAnimationDelegate* delegate) override; |
| 44 void OnGetTarget(TargetValue* target) const override; | 45 void OnGetTarget(TargetValue* target) const override; |
| 45 void OnAbort(ui::LayerAnimationDelegate* delegate) override; | 46 void OnAbort(ui::LayerAnimationDelegate* delegate) override; |
| 46 | 47 |
| 47 scoped_ptr<ui::InterpolatedTransform> interpolated_transform_; | 48 std::unique_ptr<ui::InterpolatedTransform> interpolated_transform_; |
| 48 | 49 |
| 49 // The number of degrees to rotate. | 50 // The number of degrees to rotate. |
| 50 int degrees_; | 51 int degrees_; |
| 51 | 52 |
| 52 // The target origin. | 53 // The target origin. |
| 53 gfx::Point new_origin_; | 54 gfx::Point new_origin_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(WindowRotation); | 56 DISALLOW_COPY_AND_ASSIGN(WindowRotation); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace ash | 59 } // namespace ash |
| 59 | 60 |
| 60 #endif // ASH_WINDOW_ROTATION_H_ | 61 #endif // ASH_WINDOW_ROTATION_H_ |
| OLD | NEW |