| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "base/time.h" | |
| 11 | 10 |
| 12 namespace aura { | 11 namespace aura { |
| 13 class Window; | 12 class Window; |
| 14 } | 13 } |
| 15 | 14 namespace base { |
| 15 class TimeDelta; |
| 16 } |
| 17 namespace gfx { |
| 18 class Rect; |
| 19 } |
| 16 namespace ui { | 20 namespace ui { |
| 17 class ImplicitAnimationObserver; | 21 class ImplicitAnimationObserver; |
| 18 } | 22 } |
| 19 | 23 |
| 20 namespace ash { | 24 namespace ash { |
| 21 | 25 |
| 22 // A variety of canned animations for window transitions. | 26 // A variety of canned animations for window transitions. |
| 23 enum WindowVisibilityAnimationType { | 27 enum WindowVisibilityAnimationType { |
| 24 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT = 0, // Default. Lets the system | 28 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT = 0, // Default. Lets the system |
| 25 // decide based on window | 29 // decide based on window |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 65 |
| 62 // Creates an ImplicitAnimationObserver that takes ownership of the layers | 66 // Creates an ImplicitAnimationObserver that takes ownership of the layers |
| 63 // associated with a Window so that the animation can continue after the Window | 67 // associated with a Window so that the animation can continue after the Window |
| 64 // has been destroyed. | 68 // has been destroyed. |
| 65 // The returned object deletes itself when the animations are done. | 69 // The returned object deletes itself when the animations are done. |
| 66 ASH_EXPORT ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver( | 70 ASH_EXPORT ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver( |
| 67 aura::Window* window); | 71 aura::Window* window); |
| 68 | 72 |
| 69 namespace internal { | 73 namespace internal { |
| 70 | 74 |
| 75 // Animate a cross-fade of |window| from its current bounds to |new_bounds|. |
| 76 ASH_EXPORT void CrossFadeToBounds(aura::Window* window, |
| 77 const gfx::Rect& new_bounds); |
| 78 |
| 71 // Returns false if the |window| didn't animate. | 79 // Returns false if the |window| didn't animate. |
| 72 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged( | 80 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged( |
| 73 aura::Window* window, bool visible); | 81 aura::Window* window, bool visible); |
| 74 | 82 |
| 75 } // namespace internal | 83 } // namespace internal |
| 76 } // namespace ash | 84 } // namespace ash |
| 77 | 85 |
| 78 | 86 |
| 79 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ | 87 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ |
| OLD | NEW |