1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_SCOPED_ANIMATION_DISABLER_H_
6 #define ASH_SCOPED_ANIMATION_DISABLER_H_
8 #include "ash/ash_export.h"
16 // Helper class to perform window state changes without animations. Used to hide
17 // /show/minimize windows without having their animation interfere with the ones
18 // this class is in charge of.
19 class ASH_EXPORT ScopedAnimationDisabler {
21 explicit ScopedAnimationDisabler(aura::Window* window);
22 ScopedAnimationDisabler(const ScopedAnimationDisabler&) = delete;
23 ScopedAnimationDisabler& operator=(const ScopedAnimationDisabler&) = delete;
24 ~ScopedAnimationDisabler();
27 aura::Window* const window_;
28 bool needs_disable_ = false;
33 #endif // ASH_SCOPED_ANIMATION_DISABLER_H_