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