mac: Emit closed when notification is dismissed
This commit is contained in:
parent
b091f27abf
commit
c81bacc840
1 changed files with 5 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue