| 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 "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
| 10 #include "ui/views/corewm/window_animations.h" | 10 #include "ui/views/corewm/window_animations.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // Cross fades |layer| (which is a clone of |window|s layer before it was | 47 // Cross fades |layer| (which is a clone of |window|s layer before it was |
| 48 // resized) to |window|s current bounds. |new_workspace| is the Window of the | 48 // resized) to |window|s current bounds. |new_workspace| is the Window of the |
| 49 // workspace |window| was added to. | 49 // workspace |window| was added to. |
| 50 // This takes ownership of |layer|. | 50 // This takes ownership of |layer|. |
| 51 ASH_EXPORT void CrossFadeWindowBetweenWorkspaces(aura::Window* new_workspace, | 51 ASH_EXPORT void CrossFadeWindowBetweenWorkspaces(aura::Window* new_workspace, |
| 52 aura::Window* window, | 52 aura::Window* window, |
| 53 ui::Layer* layer); | 53 ui::Layer* layer); |
| 54 | 54 |
| 55 // Returns the duration of the cross-fade animation based on the |old_bounds| | 55 // Returns the duration of the cross-fade animation based on the |old_bounds| |
| 56 // and |new_bounds| of the window. | 56 // and |new_bounds| of the |window|. |
| 57 ASH_EXPORT base::TimeDelta GetCrossFadeDuration(const gfx::Rect& old_bounds, | 57 ASH_EXPORT base::TimeDelta GetCrossFadeDuration(aura::Window* window, |
| 58 const gfx::Rect& old_bounds, |
| 58 const gfx::Rect& new_bounds); | 59 const gfx::Rect& new_bounds); |
| 59 | 60 |
| 60 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, | 61 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, |
| 61 bool visible); | 62 bool visible); |
| 62 | 63 |
| 63 // Creates vector of animation sequences that lasts for |duration| and changes | 64 // Creates vector of animation sequences that lasts for |duration| and changes |
| 64 // brightness and grayscale to |target_value|. Caller takes ownership of | 65 // brightness and grayscale to |target_value|. Caller takes ownership of |
| 65 // returned LayerAnimationSequence objects. | 66 // returned LayerAnimationSequence objects. |
| 66 ASH_EXPORT std::vector<ui::LayerAnimationSequence*> | 67 ASH_EXPORT std::vector<ui::LayerAnimationSequence*> |
| 67 CreateBrightnessGrayscaleAnimationSequence(float target_value, | 68 CreateBrightnessGrayscaleAnimationSequence(float target_value, |
| 68 base::TimeDelta duration); | 69 base::TimeDelta duration); |
| 69 | 70 |
| 70 // Applies scale related to the specified AshWindowScaleType. | 71 // Applies scale related to the specified AshWindowScaleType. |
| 71 ASH_EXPORT void SetTransformForScaleAnimation( | 72 ASH_EXPORT void SetTransformForScaleAnimation( |
| 72 ui::Layer* layer, | 73 ui::Layer* layer, |
| 73 LayerScaleAnimationDirection type); | 74 LayerScaleAnimationDirection type); |
| 74 | 75 |
| 75 // Returns the approximate bounds to which |window| will be animated when it | 76 // Returns the approximate bounds to which |window| will be animated when it |
| 76 // is minimized. The bounds are approximate because the minimize animation | 77 // is minimized. The bounds are approximate because the minimize animation |
| 77 // involves rotation. | 78 // involves rotation. |
| 78 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( | 79 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( |
| 79 aura::Window* window); | 80 aura::Window* window); |
| 80 | 81 |
| 81 } // namespace ash | 82 } // namespace ash |
| 82 | 83 |
| 83 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ | 84 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ |
| OLD | NEW |