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_WM_WINDOW_ANIMATIONS_H_ | 5 #ifndef ASH_WM_WINDOW_ANIMATIONS_H_ |
6 #define ASH_WM_WINDOW_ANIMATIONS_H_ | 6 #define ASH_WM_WINDOW_ANIMATIONS_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/gfx/animation/tween.h" | 11 #include "ui/gfx/animation/tween.h" |
11 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
12 #include "ui/wm/core/window_animations.h" | 13 #include "ui/wm/core/window_animations.h" |
13 | 14 |
14 namespace aura { | 15 namespace aura { |
15 class Window; | 16 class Window; |
16 } | 17 } |
17 namespace ui { | 18 namespace ui { |
18 class Layer; | 19 class Layer; |
19 class LayerTreeOwner; | 20 class LayerTreeOwner; |
(...skipping 24 matching lines...) Expand all Loading... |
44 | 45 |
45 // Amount of time for the cross fade animation. | 46 // Amount of time for the cross fade animation. |
46 extern const int kCrossFadeDurationMS; | 47 extern const int kCrossFadeDurationMS; |
47 | 48 |
48 // Implementation of cross fading. Window is the window being cross faded. It | 49 // Implementation of cross fading. Window is the window being cross faded. It |
49 // should be at the target bounds. |old_layer_owner| contains the previous layer | 50 // should be at the target bounds. |old_layer_owner| contains the previous layer |
50 // from |window|. |tween_type| specifies the tween type of the cross fade | 51 // from |window|. |tween_type| specifies the tween type of the cross fade |
51 // animation. | 52 // animation. |
52 ASH_EXPORT base::TimeDelta CrossFadeAnimation( | 53 ASH_EXPORT base::TimeDelta CrossFadeAnimation( |
53 aura::Window* window, | 54 aura::Window* window, |
54 scoped_ptr<ui::LayerTreeOwner> old_layer_owner, | 55 std::unique_ptr<ui::LayerTreeOwner> old_layer_owner, |
55 gfx::Tween::Type tween_type); | 56 gfx::Tween::Type tween_type); |
56 | 57 |
57 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, | 58 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, |
58 bool visible); | 59 bool visible); |
59 | 60 |
60 // Creates vector of animation sequences that lasts for |duration| and changes | 61 // Creates vector of animation sequences that lasts for |duration| and changes |
61 // brightness and grayscale to |target_value|. Caller takes ownership of | 62 // brightness and grayscale to |target_value|. Caller takes ownership of |
62 // returned LayerAnimationSequence objects. | 63 // returned LayerAnimationSequence objects. |
63 ASH_EXPORT std::vector<ui::LayerAnimationSequence*> | 64 ASH_EXPORT std::vector<ui::LayerAnimationSequence*> |
64 CreateBrightnessGrayscaleAnimationSequence(float target_value, | 65 CreateBrightnessGrayscaleAnimationSequence(float target_value, |
65 base::TimeDelta duration); | 66 base::TimeDelta duration); |
66 | 67 |
67 // Applies scale related to the specified AshWindowScaleType. | 68 // Applies scale related to the specified AshWindowScaleType. |
68 ASH_EXPORT void SetTransformForScaleAnimation( | 69 ASH_EXPORT void SetTransformForScaleAnimation( |
69 ui::Layer* layer, | 70 ui::Layer* layer, |
70 LayerScaleAnimationDirection type); | 71 LayerScaleAnimationDirection type); |
71 | 72 |
72 // Returns the approximate bounds to which |window| will be animated when it | 73 // Returns the approximate bounds to which |window| will be animated when it |
73 // is minimized. The bounds are approximate because the minimize animation | 74 // is minimized. The bounds are approximate because the minimize animation |
74 // involves rotation. | 75 // involves rotation. |
75 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( | 76 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( |
76 aura::Window* window); | 77 aura::Window* window); |
77 | 78 |
78 } // namespace ash | 79 } // namespace ash |
79 | 80 |
80 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ | 81 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ |
OLD | NEW |