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

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

Issue 1750083004: Add badge to web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 9 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
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 3c125e4f60aa17f64a7ecd68622ea802852966f5..542f8b4ecf8e3e7deb1570c172a7823fb87441b8 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -486,6 +486,11 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
notification.set_renotify(notification_data.renotify);
notification.set_silent(notification_data.silent);
+ // TODO(peter): Handle different screen densities instead of always using the
+ // 1x bitmap - crbug.com/585815.
+ notification.set_small_image(
+ gfx::Image::CreateFrom1xBitmap(notification_resources.badge));
+
// Developer supplied action buttons.
std::vector<message_center::ButtonInfo> buttons;
for (size_t i = 0; i < notification_data.actions.size(); i++) {

Powered by Google App Engine
This is Rietveld 408576698