Chromium Code Reviews| Index: chrome/browser/extensions/api/notifications/notifications_api.cc |
| diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc |
| index 2e6d46f6a35c6c78d411888a2b758d96f582e3d8..58469412295e813b54dcf61ad733fb94aeb5219d 100644 |
| --- a/chrome/browser/extensions/api/notifications/notifications_api.cc |
| +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc |
| @@ -288,6 +288,13 @@ bool NotificationsApiFunction::CreateNotification( |
| // Then, handle any optional data that's been provided. |
| message_center::RichNotificationData optional_fields; |
| + if (options->small_icon_url.get()) { |
| + NotificationBitmapToGfxImage(image_scale, |
|
dewittj
2014/06/09 21:30:58
We should handle the case where this returns false
liyanhou
2014/06/16 16:56:59
Done.
|
| + bitmap_sizes.small_icon_size, |
| + options->small_icon_bitmap.get(), |
| + &optional_fields.small_image); |
| + } |
| + |
| if (options->priority.get()) |
| optional_fields.priority = *options->priority; |
| @@ -405,6 +412,14 @@ bool NotificationsApiFunction::UpdateNotification( |
| notification->set_icon(icon); |
| } |
| + gfx::Image small_icon; |
| + if (NotificationBitmapToGfxImage(image_scale, |
| + bitmap_sizes.small_icon_size, |
| + options->small_icon_bitmap.get(), |
| + &small_icon)) { |
| + notification->set_small_image(small_icon); |
| + } |
| + |
| if (options->priority) |
| notification->set_priority(*options->priority); |