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

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

Issue 2006743002: Notification badges are only supported on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | 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 f8fdd5c9157c73a0c060cca3f2ddc5c8b740bd37..081922059852d42277f2571f853b44df0c78982d 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -469,10 +469,13 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
notification.set_renotify(notification_data.renotify);
notification.set_silent(notification_data.silent);
+ // Badges are only supported on Android: crbug.com/591394#c4
Peter Beverloo 2016/05/23 15:40:03 Can we summarize the reasoning here rather than li
Michael van Ouwerkerk 2016/05/23 16:12:26 Done.
+#if defined(OS_ANDROID)
// 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));
+#endif // defined(OS_ANDROID)
// Developer supplied action buttons.
std::vector<message_center::ButtonInfo> buttons;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698