Remove unnecessary comment + respondsToSelector for isSwipeTrackingFromScrollEventsEnabled implementation

This commit is contained in:
Milan Burda 2016-08-03 15:46:39 +02:00
parent 617820dfc2
commit 136f10c4e8
2 changed files with 1 additions and 6 deletions

View file

@ -40,9 +40,6 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
void UnsubscribeLocalNotification(int request_id);
v8::Local<v8::Value> 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();

View file

@ -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