summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_animations.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 20:12:28 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 20:12:28 +0000
commit882bb34855d22bf71b46408bbd37e7dccb798659 (patch)
tree9102a762a52c1d33819223ae6f996824334e391e /ash/wm/window_animations.cc
parent165daf264ed5a09e2e783191a89500ccae65a5d5 (diff)
downloadchromium_src-882bb34855d22bf71b46408bbd37e7dccb798659.zip
chromium_src-882bb34855d22bf71b46408bbd37e7dccb798659.tar.gz
chromium_src-882bb34855d22bf71b46408bbd37e7dccb798659.tar.bz2
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
Diffstat (limited to 'ash/wm/window_animations.cc')
-rw-r--r--ash/wm/window_animations.cc7
1 files changed, 6 insertions, 1 deletions
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 {