| Index: ui/views/widget/window_visibility_animation_aura.cc
|
| diff --git a/ui/views/widget/window_visibility_animation_aura.cc b/ui/views/widget/window_visibility_animation_aura.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3171d78001a0b3fe6f23b909373747f60b358541
|
| --- /dev/null
|
| +++ b/ui/views/widget/window_visibility_animation_aura.cc
|
| @@ -0,0 +1,40 @@
|
| +// 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.
|
| +
|
| +#include "ui/views/widget/window_visibility_animation_aura.h"
|
| +
|
| +#include "ui/wm/core/window_animations.h"
|
| +
|
| +namespace views {
|
| +
|
| +WindowVisibilityAnimationAura::WindowVisibilityAnimationAura(
|
| + aura::Window* window)
|
| + : window_(window) {
|
| + DCHECK(window);
|
| +}
|
| +
|
| +WindowVisibilityAnimationAura::~WindowVisibilityAnimationAura() {
|
| +}
|
| +
|
| +void WindowVisibilityAnimationAura::SetDuration(
|
| + const base::TimeDelta& duration) {
|
| + wm::SetWindowVisibilityAnimationDuration(window_, duration);
|
| +}
|
| +
|
| +void WindowVisibilityAnimationAura::SetTransition(Transition transition) {
|
| + wm::WindowVisibilityAnimationTransition wm_transition;
|
| + switch (transition) {
|
| + case ANIMATE_SHOW:
|
| + wm_transition = wm::ANIMATE_SHOW;
|
| + case ANIMATE_HIDE:
|
| + wm_transition = wm::ANIMATE_HIDE;
|
| + case ANIMATE_BOTH:
|
| + wm_transition = wm::ANIMATE_BOTH;
|
| + case ANIMATE_NONE:
|
| + wm_transition = wm::ANIMATE_NONE;
|
| + }
|
| + wm::SetWindowVisibilityAnimationTransition(window_, wm_transition);
|
| +}
|
| +
|
| +} // namespace views
|
|
|