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

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: Also allow IO ML for unit tests 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..5e97b9365514481f4fde2516e8e265c0ef757671 100644
--- a/ui/gfx/animation/animation.cc
+++ b/ui/gfx/animation/animation.cc
@@ -14,6 +14,10 @@
#include "base/win/windows_version.h"
#endif
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
+
namespace gfx {
Animation::Animation(base::TimeDelta timer_interval)
@@ -108,6 +112,17 @@ bool Animation::ShouldRenderRichAnimation() {
#endif
}
+// static
+bool Animation::ScrollAnimationsEnabledBySystem() {
+#if defined(OS_WIN)
+ return ShouldRenderRichAnimation();
+#elif defined(OS_MACOSX)
+ return base::mac::IsScrollAnimationEnabled();
+#else
+ return true;
+#endif
+}
+
bool Animation::ShouldSendCanceledFromStop() {
return false;
}
« third_party/WebKit/public/web/mac/WebScrollbarTheme.h ('K') | « ui/gfx/animation/animation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698