Check if image is empty.
This commit is contained in:
parent
a24d4cd0d9
commit
9fb30b702a
1 changed files with 1 additions and 2 deletions
|
@ -8,7 +8,6 @@
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/mac/mac_util.h"
|
#include "base/mac/mac_util.h"
|
||||||
#include "base/mac/sdk_forward_declarations.h"
|
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "content/public/common/platform_notification_data.h"
|
#include "content/public/common/platform_notification_data.h"
|
||||||
#include "content/public/browser/desktop_notification_delegate.h"
|
#include "content/public/browser/desktop_notification_delegate.h"
|
||||||
|
@ -51,7 +50,7 @@ void NotificationPresenterMac::ShowNotification(
|
||||||
notification.title = base::SysUTF16ToNSString(data.title);
|
notification.title = base::SysUTF16ToNSString(data.title);
|
||||||
notification.informativeText = base::SysUTF16ToNSString(data.body);
|
notification.informativeText = base::SysUTF16ToNSString(data.body);
|
||||||
|
|
||||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_9)
|
if (base::mac::IsOSYosemiteOrLater() && !icon.drawsNothing())
|
||||||
notification.contentImage = gfx::SkBitmapToNSImageWithColorSpace(icon, base::mac::GetGenericRGBColorSpace());
|
notification.contentImage = gfx::SkBitmapToNSImageWithColorSpace(icon, base::mac::GetGenericRGBColorSpace());
|
||||||
|
|
||||||
notifications_map_[delegate.get()].reset(notification);
|
notifications_map_[delegate.get()].reset(notification);
|
||||||
|
|
Loading…
Reference in a new issue