From 882bb34855d22bf71b46408bbd37e7dccb798659 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Fri, 3 Feb 2012 20:12:28 +0000 Subject: Adds switch to disable window animations. This is needed to disable animation for ui tests. BUG=111086 TEST=covered by tests R=ben@chromium.org,phajdan.jr@chromium.org Review URL: https://chromiumcodereview.appspot.com/9293026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120382 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/wm/window_animations.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ash/wm/window_animations.cc') 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 { -- cgit v1.1