Chromium Code Reviews| Index: chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm |
| diff --git a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm |
| index 5b3307afd4116ccc5bf41c381c312c5dc34551c2..ab05e04c09f3130c366c1ea22d01270d7166c30a 100644 |
| --- a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm |
| +++ b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm |
| @@ -132,17 +132,15 @@ NSString* const kNotificationSettingsButtonTag = @"settingsButton"; |
| // Icon |
| if ([notificationData_ objectForKey:kNotificationImage]) { |
| - if ([toast respondsToSelector:@selector(_identityImage)]) { |
| - if ([[NSImage class] conformsToProtocol:@protocol(NSSecureCoding)]) { |
| - NSImage* image = [notificationData_ objectForKey:kNotificationImage]; |
| - [toast setValue:image forKey:@"_identityImage"]; |
| - } else { // NSImage only conforms to NSSecureCoding from 10.10 onwards. |
| - base::scoped_nsobject<NSImage> image([[NSImage alloc] |
| - initWithData:[notificationData_ objectForKey:kNotificationImage]]); |
| - [toast setValue:image forKey:@"_identityImage"]; |
| - } |
| - [toast setValue:@NO forKey:@"_identityImageHasBorder"]; |
| + if ([[NSImage class] conformsToProtocol:@protocol(NSSecureCoding)]) { |
| + NSImage* image = [notificationData_ objectForKey:kNotificationImage]; |
| + [toast setValue:image forKey:@"contentImage"]; |
| + } else { // NSImage only conforms to NSSecureCoding from 10.10 onwards. |
| + base::scoped_nsobject<NSImage> image([[NSImage alloc] |
| + initWithData:[notificationData_ objectForKey:kNotificationImage]]); |
| + [toast setValue:image forKey:@"contentImage"]; |
| } |
| + [toast setValue:@NO forKey:@"_identityImageHasBorder"]; |
|
Robert Sesek
2017/03/22 14:36:16
Is this still necessary?
|
| } |
| // Buttons |