Store weak ref to Notification in ToastEventHandler
This commit is contained in:
parent
ddee77fae4
commit
f4c27c6d29
9 changed files with 32 additions and 47 deletions
|
@ -136,19 +136,12 @@ void LibnotifyNotification::Dismiss() {
|
|||
|
||||
void LibnotifyNotification::OnNotificationClosed(
|
||||
NotifyNotification* notification) {
|
||||
delegate()->NotificationClosed();
|
||||
Destroy();
|
||||
NotificationDismissed();
|
||||
}
|
||||
|
||||
void LibnotifyNotification::OnNotificationView(
|
||||
NotifyNotification* notification, char* action) {
|
||||
delegate()->NotificationClick();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void LibnotifyNotification::NotificationFailed() {
|
||||
delegate()->NotificationFailed();
|
||||
Destroy();
|
||||
NotificationClicked();
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
|
@ -34,8 +34,6 @@ class LibnotifyNotification : public Notification {
|
|||
CHROMEG_CALLBACK_1(LibnotifyNotification, void, OnNotificationView,
|
||||
NotifyNotification*, char*);
|
||||
|
||||
void NotificationFailed();
|
||||
|
||||
NotifyNotification* notification_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LibnotifyNotification);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue