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

Unified Diff: base/mac/mac_util.mm

Issue 10092017: Mac: Prevent NTP mousewheel events from being suppressed on Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 ad735968f35d50c9d8fab0c9d059f4e7af1fa115..4b9cc8b4336b6fe79429b79d04c4df0c815a1fe5 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -21,6 +21,17 @@
#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
+#if !defined(MAC_OS_X_VERSION_10_7) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+
+// Declare symbols that are part of the 10.7 SDK.
+
+@interface NSEvent (LionSDKDeclarations)
++ (bool)isSwipeTrackingFromScrollEventsEnabled;
+@end
+
+#endif // MAC_OS_X_VERSION_10_7
+
namespace base {
namespace mac {
@@ -696,5 +707,11 @@ bool ParseModelIdentifier(const std::string& ident,
return true;
}
+bool IsSwipeTrackingFromScrollEventsEnabled() {
+ return [NSEvent respondsToSelector:@selector(
+ isSwipeTrackingFromScrollEventsEnabled)]
+ && [NSEvent isSwipeTrackingFromScrollEventsEnabled];
+}
+
} // namespace mac
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698