1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_WM_PUBLIC_ANIMATION_HOST_H_
6 #define UI_WM_PUBLIC_ANIMATION_HOST_H_
8 #include "base/compiler_specific.h"
9 #include "ui/aura/aura_export.h"
19 // Interface for top level window host of animation. Communicates additional
20 // bounds required for animation as well as animation completion for deferring
21 // window closes on hide.
22 class AURA_EXPORT AnimationHost
{
24 // Ensure the host window is at least this large so that transitions have
26 // The |top_left_delta| parameter contains the offset to be subtracted from
27 // the window bounds for the top left corner.
28 // The |bottom_right_delta| parameter contains the offset to be added to the
29 // window bounds for the bottom right.
30 virtual void SetHostTransitionOffsets(
31 const gfx::Vector2d
& top_left_delta
,
32 const gfx::Vector2d
& bottom_right_delta
) = 0;
34 // Called after the window has faded out on a hide.
35 virtual void OnWindowHidingAnimationCompleted() = 0;
38 virtual ~AnimationHost() {}
41 AURA_EXPORT
void SetAnimationHost(Window
* window
,
42 AnimationHost
* animation_host
);
43 AURA_EXPORT AnimationHost
* GetAnimationHost(Window
* window
);
48 #endif // UI_WM_PUBLIC_ANIMATION_HOST_H_