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

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

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 return false; 646 return false;
647 } 647 }
648 } 648 }
649 649
650 bool WindowAnimationsDisabled(aura::Window* window) { 650 bool WindowAnimationsDisabled(aura::Window* window) {
651 // Individual windows can choose to skip animations. 651 // Individual windows can choose to skip animations.
652 if (window && window->GetProperty(aura::client::kAnimationsDisabledKey)) 652 if (window && window->GetProperty(aura::client::kAnimationsDisabledKey))
653 return true; 653 return true;
654 654
655 // Animations can be disabled globally for testing. 655 // Animations can be disabled globally for testing.
656 if (CommandLine::ForCurrentProcess()->HasSwitch( 656 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
657 switches::kWindowAnimationsDisabled)) 657 switches::kWindowAnimationsDisabled))
658 return true; 658 return true;
659 659
660 // Tests of animations themselves should still run even if the machine is 660 // Tests of animations themselves should still run even if the machine is
661 // being accessed via Remote Desktop. 661 // being accessed via Remote Desktop.
662 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == 662 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() ==
663 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) 663 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION)
664 return false; 664 return false;
665 665
666 // Let the user decide whether or not to play the animation. 666 // Let the user decide whether or not to play the animation.
667 return !gfx::Animation::ShouldRenderRichAnimation(); 667 return !gfx::Animation::ShouldRenderRichAnimation();
668 } 668 }
669 669
670 } // namespace wm 670 } // namespace wm
OLDNEW
« no previous file with comments | « ui/views_content_client/views_content_main_delegate.cc ('k') | win8/delegate_execute/command_execute_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698