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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_mac.mm

Issue 2817813006: Make progress notifications an alert. (Closed)
Patch Set: Created 3 years, 8 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/notification_platform_bridge_mac.mm
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm
index 291d8bccebd17cb293f0e76dc5caa4cbb80395c3..3d21800d50ed5df045d8b02e5f8df52811fd31dd 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -182,6 +182,7 @@ void NotificationPlatformBridgeMac::Display(
[builder
setTitle:base::SysUTF16ToNSString(CreateNotificationTitle(notification))];
+
[builder setContextMessage:base::SysUTF16ToNSString(notification.message())];
bool requires_attribution =
@@ -246,7 +247,7 @@ void NotificationPlatformBridgeMac::Display(
// Send persistent notifications to the XPC service so they
// can be displayed as alerts. Chrome itself can only display
// banners.
- if (notification.never_timeout()) {
+ if (notification.never_timeout() || notification.progress() > 0) {
Peter Beverloo 2017/04/13 14:14:14 Please detail why we're doing this in the comment
Miguel Garcia 2017/04/13 16:36:19 Done.
NSDictionary* dict = [builder buildDictionary];
[alert_dispatcher_ dispatchNotification:dict];
} else {

Powered by Google App Engine
This is Rietveld 408576698