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

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: Move from base/mac to animation_mac.mm 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
Index: ui/gfx/animation/animation.cc
diff --git a/ui/gfx/animation/animation.cc b/ui/gfx/animation/animation.cc
index 3c298285e1310ea4d1b9b0e2c5fc5afed193af2e..8a6d4e57bdd9286de7c1607367092b90779be4ea 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 Win
Avi (use Gerrit) 2016/02/10 00:24:54 "... for Windows." complete sentences, plz
bokan 2016/02/10 16:31:22 Done.
return true;
+}
#endif
+
+#if !defined(OS_WIN) && !defined(OS_MACOSX)
+// static
+bool Animation::ScrollAnimationsEnabledBySystem() {
+ // Defined in platform specific files for Win/Mac
Avi (use Gerrit) 2016/02/10 00:24:54 sentences ending in period
bokan 2016/02/10 16:31:22 Done.
+ return true;
}
+#endif
bool Animation::ShouldSendCanceledFromStop() {
return false;

Powered by Google App Engine
This is Rietveld 408576698