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

Side by Side Diff: app/animation.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | app/animation_unittest.cc » ('j') | chrome/browser/google/google_update.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/animation.h" 5 #include "app/animation.h"
6 6
7 #include "app/tween.h" 7 #include "app/tween.h"
8 #include "gfx/rect.h" 8 #include "gfx/rect.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include "base/win_util.h" 11 #include "base/win/windows_version.h"
12 #endif 12 #endif
13 13
14 Animation::Animation(base::TimeDelta timer_interval) 14 Animation::Animation(base::TimeDelta timer_interval)
15 : timer_interval_(timer_interval), 15 : timer_interval_(timer_interval),
16 is_animating_(false), 16 is_animating_(false),
17 delegate_(NULL) { 17 delegate_(NULL) {
18 } 18 }
19 19
20 Animation::~Animation() { 20 Animation::~Animation() {
21 // Don't send out notification from the destructor. Chances are the delegate 21 // Don't send out notification from the destructor. Chances are the delegate
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 else 83 else
84 container_ = new AnimationContainer(); 84 container_ = new AnimationContainer();
85 85
86 if (is_animating_) 86 if (is_animating_)
87 container_->Start(this); 87 container_->Start(this);
88 } 88 }
89 89
90 // static 90 // static
91 bool Animation::ShouldRenderRichAnimation() { 91 bool Animation::ShouldRenderRichAnimation() {
92 #if defined(OS_WIN) 92 #if defined(OS_WIN)
93 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { 93 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
94 BOOL result; 94 BOOL result;
95 // Get "Turn off all unnecessary animations" value. 95 // Get "Turn off all unnecessary animations" value.
96 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) { 96 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) {
97 // There seems to be a typo in the MSDN document (as of May 2009): 97 // There seems to be a typo in the MSDN document (as of May 2009):
98 // http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx 98 // http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx
99 // The document states that the result is TRUE when animations are 99 // The document states that the result is TRUE when animations are
100 // _disabled_, but in fact, it is TRUE when they are _enabled_. 100 // _disabled_, but in fact, it is TRUE when they are _enabled_.
101 return !!result; 101 return !!result;
102 } 102 }
103 } 103 }
104 return !::GetSystemMetrics(SM_REMOTESESSION); 104 return !::GetSystemMetrics(SM_REMOTESESSION);
105 #endif 105 #endif
106 return true; 106 return true;
107 } 107 }
108 108
109 void Animation::SetStartTime(base::TimeTicks start_time) { 109 void Animation::SetStartTime(base::TimeTicks start_time) {
110 start_time_ = start_time; 110 start_time_ = start_time;
111 } 111 }
OLDNEW
« no previous file with comments | « no previous file | app/animation_unittest.cc » ('j') | chrome/browser/google/google_update.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698