Call [NSUserNotification setContentImage] conditionally using respondsToSelector instead of hardcoded OS X version check
This commit is contained in:
parent
da0197543a
commit
71d582bc68
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ void NotificationPresenterMac::ShowNotification(
|
|||
notification.title = base::SysUTF16ToNSString(data.title);
|
||||
notification.informativeText = base::SysUTF16ToNSString(data.body);
|
||||
|
||||
if (base::mac::IsOSYosemiteOrLater() && !icon.drawsNothing())
|
||||
if ([notification respondsToSelector:@selector(setContentImage:)] && !icon.drawsNothing())
|
||||
notification.contentImage = gfx::SkBitmapToNSImageWithColorSpace(icon, base::mac::GetGenericRGBColorSpace());
|
||||
|
||||
notifications_map_[delegate.get()].reset(notification);
|
||||
|
|
Loading…
Reference in a new issue