From 136f10c4e8d4d2841e773ab8a5e411368b127753 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 3 Aug 2016 15:46:39 +0200 Subject: [PATCH] Remove unnecessary comment + respondsToSelector for isSwipeTrackingFromScrollEventsEnabled implementation --- atom/browser/api/atom_api_system_preferences.h | 3 --- atom/browser/api/atom_api_system_preferences_mac.mm | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/atom/browser/api/atom_api_system_preferences.h b/atom/browser/api/atom_api_system_preferences.h index fb180613a86..3c780059375 100644 --- a/atom/browser/api/atom_api_system_preferences.h +++ b/atom/browser/api/atom_api_system_preferences.h @@ -40,9 +40,6 @@ class SystemPreferences : public mate::EventEmitter { void UnsubscribeLocalNotification(int request_id); v8::Local GetUserDefault(const std::string& name, const std::string& type); - // On 10.7+, back and forward swipe gestures can be triggered using a scroll - // gesture, if enabled in System Preferences. This function returns true if - // the feature is supported and enabled, and false otherwise. bool IsSwipeTrackingFromScrollEventsEnabled(); #endif bool IsDarkMode(); diff --git a/atom/browser/api/atom_api_system_preferences_mac.mm b/atom/browser/api/atom_api_system_preferences_mac.mm index a0080ffd4b0..d4264dd6e87 100644 --- a/atom/browser/api/atom_api_system_preferences_mac.mm +++ b/atom/browser/api/atom_api_system_preferences_mac.mm @@ -123,9 +123,7 @@ bool SystemPreferences::IsDarkMode() { } bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() { - SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled); - return [NSEvent respondsToSelector:selector] && - [NSEvent performSelector:selector]; + return [NSEvent isSwipeTrackingFromScrollEventsEnabled]; } } // namespace api