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 |