| 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 3cc13058b69224b052a853d9f67f8f80d53f12de..8ae5e394546959eacf391edbd2393d13fc89f852 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_mac.mm
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
|
| @@ -26,6 +26,7 @@
|
| #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h"
|
| #import "chrome/browser/ui/cocoa/notifications/notification_delivery.h"
|
| #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h"
|
| +#import "chrome/browser/ui/cocoa/notifications/notification_private_mac.h"
|
| #import "chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.h"
|
| #include "chrome/common/features.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -48,7 +49,6 @@
|
| // Site settings button is implemented as NSUserNotification's action button
|
| // Not easy to implement:
|
| // -notification.requireInteraction
|
| -// -The event associated to the close button
|
|
|
| // TODO(miguelg) implement the following features
|
| // - Sound names can be implemented by setting soundName in NSUserNotification
|
| @@ -88,6 +88,7 @@ void DoProcessNotificationResponse(NotificationCommon::Operation operation,
|
| const std::string& notification_id,
|
| int32_t button_index) {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| +
|
| ProfileManager* profileManager = g_browser_process->profile_manager();
|
| DCHECK(profileManager);
|
|
|
| @@ -378,6 +379,14 @@ bool NotificationPlatformBridgeMac::VerifyNotificationData(
|
| notificationResponse);
|
| }
|
|
|
| +- (void)userNotificationCenter:(NSUserNotificationCenter*)center
|
| + didDismissAlert:(NSUserNotification*)notification {
|
| + NSDictionary* notificationResponse =
|
| + [NotificationResponseBuilder buildDictionary:notification];
|
| + NotificationPlatformBridgeMac::ProcessNotificationResponse(
|
| + notificationResponse);
|
| +}
|
| +
|
| - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center
|
| shouldPresentNotification:(NSUserNotification*)nsNotification {
|
| // Always display notifications, regardless of whether the app is foreground.
|
|
|