Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

Issue 2261283002: Add Notification images (Blink + desktop implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check IPC drawsNothing rather than isNull Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/platform_notification_service_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..044a1d8717a32d5509f4c1a86a36196e17d08ec1 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -459,9 +459,14 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
notification.set_renotify(notification_data.renotify);
notification.set_silent(notification_data.silent);
+ 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.
#if defined(OS_ANDROID)
// TODO(peter): Handle different screen densities instead of always using the
// 1x bitmap - crbug.com/585815.
« no previous file with comments | « no previous file | chrome/browser/notifications/platform_notification_service_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698