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

Unified Diff: chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm

Issue 2390153005: Implement support for closing mac native notifications (Closed)
Patch Set: review Created 4 years, 2 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/ui/cocoa/notifications/notification_response_builder_mac.mm
diff --git a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm
index c773dc5404d75f2cd370dd6b28e8bc1302665550..fd582a93865e62652e0af8baa22b7dee079a431c 100644
--- a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm
+++ b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm
@@ -46,9 +46,11 @@ enum NotificationOperation {
NSNumber* notificationType = [[notification userInfo]
objectForKey:notification_constants::kNotificationType];
- // Initialize operation and button index for the case where the
- // notification itself was clicked.
- NotificationOperation operation = NOTIFICATION_CLICK;
+ // Closed notifications are not activated.
Peter Beverloo 2016/10/06 14:35:19 are not -> have not been?
Miguel Garcia 2016/10/07 13:42:24 Well they are never activated so I think this is c
+ NotificationOperation operation =
+ notification.activationType == NSUserNotificationActivationTypeNone
+ ? NOTIFICATION_CLOSE
+ : NOTIFICATION_CLICK;
int buttonIndex = -1;
// Determine whether the user clicked on a button, and if they did, whether it

Powered by Google App Engine
This is Rietveld 408576698