summaryrefslogtreecommitdiffstats
path: root/ash/wm/overview/scoped_overview_animation_settings.h
blob: 4ea09e53a480cc2e606a3708cfe3cfcce89017b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_WM_OVERVIEW_SCOPED_OVERVIEW_ANIMATION_SETTINGS_H_
#define ASH_WM_OVERVIEW_SCOPED_OVERVIEW_ANIMATION_SETTINGS_H_

#include "ash/wm/overview/overview_animation_type.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/compositor/scoped_layer_animation_settings.h"

namespace aura {
class Window;
}  // namespace aura

namespace ash {

// The ScopedOveriewAnimationSettings class correctly configures the animation
// settings for an aura::Window for a given OverviewAnimationType.
class ScopedOverviewAnimationSettings {
 public:
  ScopedOverviewAnimationSettings(OverviewAnimationType animation_type,
                                  aura::Window* window);
  virtual ~ScopedOverviewAnimationSettings();

  // Convenvience method to fade in a Window with predefined animation settings.
  // Note: The fade in animation will occur after a delay where the delay is how
  // long the lay out animations take.
  static void SetupFadeInAfterLayout(aura::Window* window);

 private:
  // The managed animation settings.
  ui::ScopedLayerAnimationSettings animation_settings_;

  DISALLOW_COPY_AND_ASSIGN(ScopedOverviewAnimationSettings);
};

}  // namespace ash

#endif  // ASH_WM_OVERVIEW_SCOPED_OVERVIEW_ANIMATION_SETTINGS_H_