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

Unified Diff: ui/gfx/animation/animation.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/animation/animation.h ('k') | ui/gfx/animation/animation_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/animation/animation.cc
diff --git a/ui/gfx/animation/animation.cc b/ui/gfx/animation/animation.cc
index 3c298285e1310ea4d1b9b0e2c5fc5afed193af2e..4bc1b248aa77f3fae4c5ec65851d8c589449a1f3 100644
--- a/ui/gfx/animation/animation.cc
+++ b/ui/gfx/animation/animation.cc
@@ -10,10 +10,6 @@
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/geometry/rect.h"
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
namespace gfx {
Animation::Animation(base::TimeDelta timer_interval)
@@ -92,21 +88,21 @@ void Animation::SetContainer(AnimationContainer* container) {
container_->Start(this);
}
+#if !defined(OS_WIN)
// static
bool Animation::ShouldRenderRichAnimation() {
-#if defined(OS_WIN)
- if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- BOOL result;
- // Get "Turn off all unnecessary animations" value.
- if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) {
- return !!result;
- }
- }
- return !::GetSystemMetrics(SM_REMOTESESSION);
-#else
+ // Defined in platform specific file for Windows.
return true;
+}
#endif
+
+#if !defined(OS_WIN) && !defined(OS_MACOSX)
+// static
+bool Animation::ScrollAnimationsEnabledBySystem() {
+ // Defined in platform specific files for Windows and OSX.
+ return true;
}
+#endif
bool Animation::ShouldSendCanceledFromStop() {
return false;
« no previous file with comments | « ui/gfx/animation/animation.h ('k') | ui/gfx/animation/animation_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698