| Index: ui/wm/core/window_animations.h
|
| diff --git a/ui/wm/core/window_animations.h b/ui/wm/core/window_animations.h
|
| index 2c7997d9538a647ba306e278cd304a1ab8905ba3..ae1295bdb45a1591f897f3ce1c4bb6149a06c1d2 100644
|
| --- a/ui/wm/core/window_animations.h
|
| +++ b/ui/wm/core/window_animations.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <vector>
|
|
|
| +#include "ui/compositor/scoped_layer_animation_settings.h"
|
| #include "ui/wm/core/wm_core_export.h"
|
|
|
| namespace aura {
|
| @@ -81,12 +82,39 @@ WM_CORE_EXPORT void SetWindowVisibilityAnimationVerticalPosition(
|
| aura::Window* window,
|
| float position);
|
|
|
| -// Creates an ImplicitAnimationObserver that takes ownership of the layers
|
| -// associated with a Window so that the animation can continue after the Window
|
| -// has been destroyed.
|
| -// The returned object deletes itself when the animations are done.
|
| -WM_CORE_EXPORT ui::ImplicitAnimationObserver*
|
| - CreateHidingWindowAnimationObserver(aura::Window* window);
|
| +// A wrapper of ui::ScopedLayerAnimationSettings for hiding animations.
|
| +// Use this to ensure that the animation is visible even after
|
| +// the window is deleted, instead of directly using
|
| +// ui::ScopedLayerAnimationSettings.
|
| +class WM_CORE_EXPORT ScopedHidingAnimationSettings {
|
| + public:
|
| + explicit ScopedHidingAnimationSettings(aura::Window* window);
|
| + ~ScopedHidingAnimationSettings();
|
| +
|
| + // Returns the wrapped ScopedLayeAnimationSettings instance.
|
| + ui::ScopedLayerAnimationSettings* layer_animation_settings() {
|
| + return &layer_animation_settings_;
|
| + }
|
| +
|
| + // When set to true, this recreates layers for the window and and puts
|
| + // the original (and animating) layers on top of |window_| and
|
| + // its transient children so that these layers stay above new
|
| + // focused window. This is typically used when closing a focusable
|
| + // toplevel window.
|
| + // Note that this is effective only if |window| has focus when
|
| + // applying the animation.
|
| + void set_ensure_visible_after_focus_lost(
|
| + bool ensure_visible_after_focus_loste) {
|
| + ensure_visibility_after_focus_lost_ = ensure_visible_after_focus_lost;
|
| + }
|
| +
|
| + private:
|
| + aura::Window* window_;
|
| + bool ensure_visibility_after_focus_lost_;
|
| + ui::ScopedLayerAnimationSettings layer_animation_settings_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedHidingAnimationSettings);
|
| +};
|
|
|
| // Returns false if the |window| didn't animate.
|
| WM_CORE_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window,
|
|
|