Upload upstream chromium 108.0.5359.1
[platform/framework/web/chromium-efl.git] / ash / scoped_animation_disabler.h
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.
4
5 #ifndef ASH_SCOPED_ANIMATION_DISABLER_H_
6 #define ASH_SCOPED_ANIMATION_DISABLER_H_
7
8 #include "ash/ash_export.h"
9
10 namespace aura {
11 class Window;
12 }
13
14 namespace ash {
15
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 {
20  public:
21   explicit ScopedAnimationDisabler(aura::Window* window);
22   ScopedAnimationDisabler(const ScopedAnimationDisabler&) = delete;
23   ScopedAnimationDisabler& operator=(const ScopedAnimationDisabler&) = delete;
24   ~ScopedAnimationDisabler();
25
26  private:
27   aura::Window* const window_;
28   bool needs_disable_ = false;
29 };
30
31 }  // namespace ash
32
33 #endif  // ASH_SCOPED_ANIMATION_DISABLER_H_