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

Unified Diff: base/mac/mac_util.mm

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: Created 4 years, 11 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: base/mac/mac_util.mm
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index 75d53c90961086c6225b352981d181a8d5733524..03e6678095ced3683e5e2540d3bdbcaa47336ef5 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -603,5 +603,21 @@ bool ParseModelIdentifier(const std::string& ident,
return true;
}
+bool IsScrollAnimationEnabled() {
+ bool enabled = false;
+ id value = nil;
+ if (base::mac::IsOSMountainLionOrLater()) {
+ value = [[NSUserDefaults standardUserDefaults]
+ objectForKey:@"NSScrollAnimationEnabled"];
+ } else {
+ value = [[NSUserDefaults standardUserDefaults]
+ objectForKey:@"AppleScrollAnimationEnabled"];
+ }
+ if (value)
+ enabled = [value boolValue];
+ return enabled;
+}
+
+
} // namespace mac
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698