mac: Emit closed when notification is dismissed

This commit is contained in:
Cheng Zhao 2015-12-25 11:12:25 +08:00
parent b091f27abf
commit c81bacc840

View file

@ -24,10 +24,8 @@ CocoaNotification::CocoaNotification(NotificationDelegate* delegate,
}
CocoaNotification::~CocoaNotification() {
if (notification_) {
[NSUserNotificationCenter.defaultUserNotificationCenter
removeDeliveredNotification:notification_];
}
[NSUserNotificationCenter.defaultUserNotificationCenter
removeDeliveredNotification:notification_];
}
void CocoaNotification::Show(const base::string16& title,
@ -50,6 +48,9 @@ void CocoaNotification::Show(const base::string16& title,
}
void CocoaNotification::Dismiss() {
[NSUserNotificationCenter.defaultUserNotificationCenter
removeDeliveredNotification:notification_];
delegate()->NotificationClosed();
Destroy();
}