NSUserNotification should respond
NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9
This commit is contained in:
		
					parent
					
						
							
								3ee3e9a3e8
							
						
					
				
			
			
				commit
				
					
						31baafab3b
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue