Home | History | Annotate | Download | only in client
      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.
      4 
      5 #ifndef UI_AURA_CLIENT_ANIMATION_HOST_H_
      6 #define UI_AURA_CLIENT_ANIMATION_HOST_H_
      7 
      8 #include "base/compiler_specific.h"
      9 #include "ui/aura/aura_export.h"
     10 
     11 namespace gfx {
     12 class Rect;
     13 }
     14 
     15 namespace aura {
     16 class Window;
     17 namespace client {
     18 
     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   virtual void SetHostTransitionBounds(const gfx::Rect& bounds) = 0;
     27 
     28   // Called after the window has faded out on a hide.
     29   virtual void OnWindowHidingAnimationCompleted() = 0;
     30 
     31  protected:
     32   virtual ~AnimationHost() {}
     33 };
     34 
     35 AURA_EXPORT void SetAnimationHost(Window* window,
     36                                   AnimationHost* animation_host);
     37 AURA_EXPORT AnimationHost* GetAnimationHost(Window* window);
     38 
     39 }  // namespace client
     40 }  // namespace aura
     41 
     42 #endif  // UI_AURA_CLIENT_ANIMATION_HOST_H_
     43