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> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ui/gfx/animation/tween.h" | 11 #include "ui/gfx/animation/tween.h" |
12 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
13 #include "ui/wm/core/window_animations.h" | 13 #include "ui/wm/core/window_animations.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class Window; | 16 class Window; |
17 } | 17 } |
18 namespace ui { | 18 namespace ui { |
19 class Layer; | 19 class Layer; |
20 class LayerTreeOwner; | 20 class LayerTreeOwner; |
21 } | 21 } |
22 namespace views {} | 22 namespace views {} |
James Cook
2016/08/11 00:50:06
Wow, I've never seen this before.
msw
2016/08/11 02:08:51
Removed.
| |
23 | 23 |
24 // This is only for animations specific to Ash. For window animations shared | 24 // This is only for animations specific to Ash. For window animations shared |
25 // with desktop Chrome, see ui/views/corewm/window_animations.h. | 25 // with desktop Chrome, see ui/views/corewm/window_animations.h. |
26 namespace ash { | 26 namespace ash { |
27 | 27 |
28 // Direction for ash-specific window animations used in workspaces and | 28 // Direction for ash-specific window animations used in workspaces and |
29 // lock/unlock animations. | 29 // lock/unlock animations. |
30 enum LayerScaleAnimationDirection { | 30 enum LayerScaleAnimationDirection { |
31 LAYER_SCALE_ANIMATION_ABOVE, | 31 LAYER_SCALE_ANIMATION_ABOVE, |
32 LAYER_SCALE_ANIMATION_BELOW, | 32 LAYER_SCALE_ANIMATION_BELOW, |
33 }; | 33 }; |
34 | 34 |
35 // Amount of time for the cross fade animation. | |
36 extern const int kCrossFadeDurationMS; | |
James Cook
2016/08/11 00:50:06
WDYT of leaving this where it is, and introducing
msw
2016/08/11 02:08:51
Done.
| |
37 | |
38 // Implementation of cross fading. Window is the window being cross faded. It | 35 // Implementation of cross fading. Window is the window being cross faded. It |
39 // should be at the target bounds. |old_layer_owner| contains the previous layer | 36 // should be at the target bounds. |old_layer_owner| contains the previous layer |
40 // from |window|. |tween_type| specifies the tween type of the cross fade | 37 // from |window|. |tween_type| specifies the tween type of the cross fade |
41 // animation. | 38 // animation. |
42 ASH_EXPORT base::TimeDelta CrossFadeAnimation( | 39 ASH_EXPORT base::TimeDelta CrossFadeAnimation( |
43 aura::Window* window, | 40 aura::Window* window, |
44 std::unique_ptr<ui::LayerTreeOwner> old_layer_owner, | 41 std::unique_ptr<ui::LayerTreeOwner> old_layer_owner, |
45 gfx::Tween::Type tween_type); | 42 gfx::Tween::Type tween_type); |
46 | 43 |
47 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, | 44 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, |
(...skipping 13 matching lines...) Expand all Loading... | |
61 | 58 |
62 // Returns the approximate bounds to which |window| will be animated when it | 59 // Returns the approximate bounds to which |window| will be animated when it |
63 // is minimized. The bounds are approximate because the minimize animation | 60 // is minimized. The bounds are approximate because the minimize animation |
64 // involves rotation. | 61 // involves rotation. |
65 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( | 62 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( |
66 aura::Window* window); | 63 aura::Window* window); |
67 | 64 |
68 } // namespace ash | 65 } // namespace ash |
69 | 66 |
70 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ | 67 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ |
OLD | NEW |