OLD | NEW |
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 "ui/gfx/animation/animation_container.h" | 7 #include "ui/gfx/animation/animation_container.h" |
8 #include "ui/gfx/animation/animation_delegate.h" | 8 #include "ui/gfx/animation/animation_delegate.h" |
9 #include "ui/gfx/animation/tween.h" | 9 #include "ui/gfx/animation/tween.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Get "Turn off all unnecessary animations" value. | 99 // Get "Turn off all unnecessary animations" value. |
100 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) { | 100 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) { |
101 // There seems to be a typo in the MSDN document (as of May 2009): | 101 // There seems to be a typo in the MSDN document (as of May 2009): |
102 // http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx | 102 // http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx |
103 // The document states that the result is TRUE when animations are | 103 // The document states that the result is TRUE when animations are |
104 // _disabled_, but in fact, it is TRUE when they are _enabled_. | 104 // _disabled_, but in fact, it is TRUE when they are _enabled_. |
105 return !!result; | 105 return !!result; |
106 } | 106 } |
107 } | 107 } |
108 return !::GetSystemMetrics(SM_REMOTESESSION); | 108 return !::GetSystemMetrics(SM_REMOTESESSION); |
| 109 #else |
| 110 return true; |
109 #endif | 111 #endif |
110 return true; | |
111 } | 112 } |
112 | 113 |
113 bool Animation::ShouldSendCanceledFromStop() { | 114 bool Animation::ShouldSendCanceledFromStop() { |
114 return false; | 115 return false; |
115 } | 116 } |
116 | 117 |
117 void Animation::SetStartTime(base::TimeTicks start_time) { | 118 void Animation::SetStartTime(base::TimeTicks start_time) { |
118 start_time_ = start_time; | 119 start_time_ = start_time; |
119 } | 120 } |
120 | 121 |
121 base::TimeDelta Animation::GetTimerInterval() const { | 122 base::TimeDelta Animation::GetTimerInterval() const { |
122 return timer_interval_; | 123 return timer_interval_; |
123 } | 124 } |
124 | 125 |
125 } // namespace gfx | 126 } // namespace gfx |
OLD | NEW |