Chromium Code Reviews| Index: chrome/browser/notifications/platform_notification_service_impl.cc |
| diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc |
| index 4408a1c00046141c983e0d286ed4a6e20fc1805d..7f12f43e917b064accce0664b534e43c5ef8b907 100644 |
| --- a/chrome/browser/notifications/platform_notification_service_impl.cc |
| +++ b/chrome/browser/notifications/platform_notification_service_impl.cc |
| @@ -459,6 +459,13 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData( |
| notification.set_renotify(notification_data.renotify); |
| notification.set_silent(notification_data.silent); |
| + // TODO(johnme): ensure image is not loaded when it will not be used. |
|
Peter Beverloo
2016/08/22 20:11:07
I get why you have this TODO here, but this really
johnme
2016/08/23 14:59:49
Done. Moved the badge one too.
|
| + if (!notification_resources.image.drawsNothing()) { |
| + notification.set_type(message_center::NOTIFICATION_TYPE_IMAGE); |
| + notification.set_image( |
| + gfx::Image::CreateFrom1xBitmap(notification_resources.image)); |
| + } |
| + |
| // Badges are only supported on Android, primarily because it's the only |
| // platform that makes good use of them in the status bar. |
| // TODO(mvanouwerkerk): ensure no badge is loaded when it will not be used. |