1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/scoped_animation_disabler.h"
7 #include "ui/aura/client/aura_constants.h"
8 #include "ui/base/class_property.h"
12 ScopedAnimationDisabler::ScopedAnimationDisabler(aura::Window* window)
14 needs_disable_ = !window_->GetProperty(aura::client::kAnimationsDisabledKey);
16 window_->SetProperty(aura::client::kAnimationsDisabledKey, true);
19 ScopedAnimationDisabler::~ScopedAnimationDisabler() {
21 window_->ClearProperty(aura::client::kAnimationsDisabledKey);