diff options
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash_switches.cc | 3 | ||||
-rw-r--r-- | ash/ash_switches.h | 1 | ||||
-rw-r--r-- | ash/wm/window_animations.cc | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc index 068e173..44e1737 100644 --- a/ash/ash_switches.cc +++ b/ash/ash_switches.cc @@ -31,6 +31,9 @@ const char kAuraNoShadows[] = "aura-no-shadows"; // Use Aura-style translucent window frame. const char kAuraTranslucentFrames[] = "aura-translucent-frames"; +// If present animations are disabled. +const char kAuraWindowAnimationsDisabled[] = "aura-window-animations-disabled"; + // Use a custom window style, e.g. --aura-window-mode=compact. // When this flag is not passed we default to "overlapping" mode. const char kAuraWindowMode[] = "aura-window-mode"; diff --git a/ash/ash_switches.h b/ash/ash_switches.h index 2fa7780..3759607 100644 --- a/ash/ash_switches.h +++ b/ash/ash_switches.h @@ -17,6 +17,7 @@ ASH_EXPORT extern const char kAuraGoogleDialogFrames[]; ASH_EXPORT extern const char kAuraLegacyPowerButton[]; ASH_EXPORT extern const char kAuraNoShadows[]; ASH_EXPORT extern const char kAuraTranslucentFrames[]; +ASH_EXPORT extern const char kAuraWindowAnimationsDisabled[]; ASH_EXPORT extern const char kAuraWindowMode[]; ASH_EXPORT extern const char kAuraWindowModeCompact[]; ASH_EXPORT extern const char kAuraWindowModeManaged[]; diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index 5c4c3a4..c2deef2 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -4,6 +4,8 @@ #include "ash/wm/window_animations.h" +#include "ash/ash_switches.h" +#include "base/command_line.h" #include "base/compiler_specific.h" #include "base/logging.h" #include "base/message_loop.h" @@ -273,8 +275,11 @@ bool AnimateHideWindow(aura::Window* window) { // WindowAnimation, public: bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) { - if (window->GetIntProperty(aura::client::kAnimationsDisabledKey) == 1) + if (window->GetIntProperty(aura::client::kAnimationsDisabledKey) == 1 || + CommandLine::ForCurrentProcess()->HasSwitch( + switches::kAuraWindowAnimationsDisabled)) { return false; + } if (visible) { return AnimateShowWindow(window); } else { |