From 31baafab3be1f814cdc6ac281a644e8ae223166a Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Tue, 16 Jan 2018 18:59:30 -0800 Subject: [PATCH] NSUserNotification should respond NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9 --- brightray/browser/mac/cocoa_notification.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index e1a8092d2a..d669577bad 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -41,8 +41,7 @@ void CocoaNotification::Show(const NotificationOptions& options) { LOG(INFO) << "Notification created (" << [identifier UTF8String] << ")"; } - if ([notification_ respondsToSelector:@selector(setContentImage:)] && - !options.icon.drawsNothing()) { + if (!options.icon.drawsNothing()) { NSImage* image = skia::SkBitmapToNSImageWithColorSpace( options.icon, base::mac::GetGenericRGBColorSpace()); [notification_ setContentImage:image];