forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscoped_animation_disabler.h
33 lines (25 loc) · 951 Bytes
/
scoped_animation_disabler.h
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
// Copyright 2018 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_SCOPED_ANIMATION_DISABLER_H_
#define ASH_SCOPED_ANIMATION_DISABLER_H_
#include "ash/ash_export.h"
namespace aura {
class Window;
}
namespace ash {
// Helper class to perform window state changes without animations. Used to hide
// /show/minimize windows without having their animation interfere with the ones
// this class is in charge of.
class ASH_EXPORT ScopedAnimationDisabler {
public:
explicit ScopedAnimationDisabler(aura::Window* window);
ScopedAnimationDisabler(const ScopedAnimationDisabler&) = delete;
ScopedAnimationDisabler& operator=(const ScopedAnimationDisabler&) = delete;
~ScopedAnimationDisabler();
private:
aura::Window* const window_;
bool needs_disable_ = false;
};
} // namespace ash
#endif // ASH_SCOPED_ANIMATION_DISABLER_H_