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

Side by Side Diff: ui/gfx/animation/animation.cc

Issue 1566303004: Smooth scroll on Windows should respect OS level animation disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 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 | « content/renderer/render_view_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/animation/animation.h" 5 #include "ui/gfx/animation/animation.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/gfx/animation/animation_container.h" 8 #include "ui/gfx/animation/animation_container.h"
9 #include "ui/gfx/animation/animation_delegate.h" 9 #include "ui/gfx/animation/animation_delegate.h"
10 #include "ui/gfx/animation/tween.h" 10 #include "ui/gfx/animation/tween.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 container_->Start(this); 92 container_->Start(this);
93 } 93 }
94 94
95 // static 95 // static
96 bool Animation::ShouldRenderRichAnimation() { 96 bool Animation::ShouldRenderRichAnimation() {
97 #if defined(OS_WIN) 97 #if defined(OS_WIN)
98 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { 98 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
99 BOOL result; 99 BOOL result;
100 // Get "Turn off all unnecessary animations" value. 100 // Get "Turn off all unnecessary animations" value.
101 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) { 101 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) {
102 // There seems to be a typo in the MSDN document (as of May 2009):
103 // http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx
104 // The document states that the result is TRUE when animations are
105 // _disabled_, but in fact, it is TRUE when they are _enabled_.
106 return !!result; 102 return !!result;
107 } 103 }
108 } 104 }
109 return !::GetSystemMetrics(SM_REMOTESESSION); 105 return !::GetSystemMetrics(SM_REMOTESESSION);
110 #else 106 #else
111 return true; 107 return true;
112 #endif 108 #endif
113 } 109 }
114 110
115 bool Animation::ShouldSendCanceledFromStop() { 111 bool Animation::ShouldSendCanceledFromStop() {
116 return false; 112 return false;
117 } 113 }
118 114
119 void Animation::SetStartTime(base::TimeTicks start_time) { 115 void Animation::SetStartTime(base::TimeTicks start_time) {
120 start_time_ = start_time; 116 start_time_ = start_time;
121 } 117 }
122 118
123 base::TimeDelta Animation::GetTimerInterval() const { 119 base::TimeDelta Animation::GetTimerInterval() const {
124 return timer_interval_; 120 return timer_interval_;
125 } 121 }
126 122
127 } // namespace gfx 123 } // namespace gfx
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698