NSUserNotification should respond

NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9
This commit is contained in:
Zhuo Lu 2018-01-16 18:59:30 -08:00
parent 3ee3e9a3e8
commit 31baafab3b

View file

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