Expand SecurityStyleChanged interfaces to include explanations
[chromium-blink-merge.git] / ui / wm / public / animation_host.h
blob71f9f4d72b6f35322b6f455a10eb09704c5eb4c4
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"
11 namespace gfx {
12 class Vector2d;
15 namespace aura {
16 class Window;
17 namespace client {
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 {
23 public:
24 // Ensure the host window is at least this large so that transitions have
25 // sufficient space.
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;
37 protected:
38 virtual ~AnimationHost() {}
41 AURA_EXPORT void SetAnimationHost(Window* window,
42 AnimationHost* animation_host);
43 AURA_EXPORT AnimationHost* GetAnimationHost(Window* window);
45 } // namespace client
46 } // namespace aura
48 #endif // UI_WM_PUBLIC_ANIMATION_HOST_H_