| 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 ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ | 5 #ifndef ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ |
| 6 #define ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ | 6 #define ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 14 #include "ui/compositor/layer_animation_element.h" | 15 #include "ui/compositor/layer_animation_element.h" |
| 15 #include "ui/gfx/animation/tween.h" | 16 #include "ui/gfx/animation/tween.h" |
| 16 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
| 17 | 18 |
| 18 namespace ui { | 19 namespace ui { |
| 19 class InterpolatedTransform; | 20 class InterpolatedTransform; |
| 20 class Layer; | 21 class Layer; |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 // Implementation of ui::LayerAnimationDelegate | 44 // Implementation of ui::LayerAnimationDelegate |
| 44 void OnStart(ui::LayerAnimationDelegate* delegate) override; | 45 void OnStart(ui::LayerAnimationDelegate* delegate) override; |
| 45 bool OnProgress(double current, | 46 bool OnProgress(double current, |
| 46 ui::LayerAnimationDelegate* delegate) override; | 47 ui::LayerAnimationDelegate* delegate) override; |
| 47 void OnGetTarget(TargetValue* target) const override; | 48 void OnGetTarget(TargetValue* target) const override; |
| 48 void OnAbort(ui::LayerAnimationDelegate* delegate) override; | 49 void OnAbort(ui::LayerAnimationDelegate* delegate) override; |
| 49 | 50 |
| 50 // The root InterpolatedTransform that defines the animation. | 51 // The root InterpolatedTransform that defines the animation. |
| 51 scoped_ptr<ui::InterpolatedTransform> interpolated_transform_; | 52 std::unique_ptr<ui::InterpolatedTransform> interpolated_transform_; |
| 52 | 53 |
| 53 // The Tween type to use for the animation. | 54 // The Tween type to use for the animation. |
| 54 gfx::Tween::Type tween_type_; | 55 gfx::Tween::Type tween_type_; |
| 55 | 56 |
| 56 // The initial layer opacity to start the animation with. | 57 // The initial layer opacity to start the animation with. |
| 57 float initial_opacity_; | 58 float initial_opacity_; |
| 58 | 59 |
| 59 // The target layer opacity to end the animation with. | 60 // The target layer opacity to end the animation with. |
| 60 float target_opacity_; | 61 float target_opacity_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimation); | 63 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimation); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace ash | 66 } // namespace ash |
| 66 | 67 |
| 67 #endif // ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ | 68 #endif // ASH_ROTATOR_SCREEN_ROTATION_ANIMATION_H_ |
| OLD | NEW |