| 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..5039fe5c972e25bce0f1cf0cf344a483e01deff1 100644
|
| --- a/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| @@ -288,6 +288,16 @@ bool NotificationsApiFunction::CreateNotification(
|
|
|
| // Then, handle any optional data that's been provided.
|
| message_center::RichNotificationData optional_fields;
|
| + if (options->app_icon_mask_url.get()) {
|
| + if (!NotificationBitmapToGfxImage(image_scale,
|
| + bitmap_sizes.app_icon_mask_size,
|
| + options->app_icon_mask_bitmap.get(),
|
| + &optional_fields.small_image)) {
|
| + SetError(kUnableToDecodeIconError);
|
| + return false;
|
| + }
|
| + }
|
| +
|
| if (options->priority.get())
|
| optional_fields.priority = *options->priority;
|
|
|
| @@ -405,6 +415,14 @@ bool NotificationsApiFunction::UpdateNotification(
|
| notification->set_icon(icon);
|
| }
|
|
|
| + gfx::Image app_icon_mask;
|
| + if (NotificationBitmapToGfxImage(image_scale,
|
| + bitmap_sizes.app_icon_mask_size,
|
| + options->app_icon_mask_bitmap.get(),
|
| + &app_icon_mask)) {
|
| + notification->set_small_image(app_icon_mask);
|
| + }
|
| +
|
| if (options->priority)
|
| notification->set_priority(*options->priority);
|
|
|
|
|