Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ui/wm/core/window_animations.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/views_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/wm/core/window_animations.h" 5 #include "ui/wm/core/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 return false; 648 return false;
649 } 649 }
650 } 650 }
651 651
652 bool WindowAnimationsDisabled(aura::Window* window) { 652 bool WindowAnimationsDisabled(aura::Window* window) {
653 // Individual windows can choose to skip animations. 653 // Individual windows can choose to skip animations.
654 if (window && window->GetProperty(aura::client::kAnimationsDisabledKey)) 654 if (window && window->GetProperty(aura::client::kAnimationsDisabledKey))
655 return true; 655 return true;
656 656
657 // Animations can be disabled globally for testing. 657 // Animations can be disabled globally for testing.
658 if (CommandLine::ForCurrentProcess()->HasSwitch( 658 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
659 switches::kWindowAnimationsDisabled)) 659 switches::kWindowAnimationsDisabled))
660 return true; 660 return true;
661 661
662 // Tests of animations themselves should still run even if the machine is 662 // Tests of animations themselves should still run even if the machine is
663 // being accessed via Remote Desktop. 663 // being accessed via Remote Desktop.
664 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == 664 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() ==
665 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) 665 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION)
666 return false; 666 return false;
667 667
668 // Let the user decide whether or not to play the animation. 668 // Let the user decide whether or not to play the animation.
669 return !gfx::Animation::ShouldRenderRichAnimation(); 669 return !gfx::Animation::ShouldRenderRichAnimation();
670 } 670 }
671 671
672 } // namespace wm 672 } // namespace wm
OLDNEW
« no previous file with comments | « ui/views/views_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698