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

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

Issue 1653003002: Make scrollAnimatorEnabled work on Mac like it does on other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Previous patch accidentally lost new files Created 4 years, 10 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/gfx/animation/animation_mac.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/animation/animation.h"
6
7 #include "base/win/windows_version.h"
8
9 namespace gfx {
10
11 // static
12 bool Animation::ShouldRenderRichAnimation() {
13 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
14 BOOL result;
15 // Get "Turn off all unnecessary animations" value.
16 if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) {
17 return !!result;
18 }
19 }
20 return !::GetSystemMetrics(SM_REMOTESESSION);
21 }
22
23 // static
24 bool Animation::ScrollAnimationsEnabledBySystem() {
25 return ShouldRenderRichAnimation();
26 }
27
28 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/animation/animation_mac.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698