Index: chrome/renderer/notification_provider.cc |
=================================================================== |
--- chrome/renderer/notification_provider.cc (revision 36880) |
+++ chrome/renderer/notification_provider.cc (working copy) |
@@ -79,6 +79,10 @@ |
return handled; |
} |
+void NotificationProvider::OnNavigate() { |
+ manager_.Clear(); |
+} |
+ |
bool NotificationProvider::ShowHTML(const WebNotification& notification, |
int id) { |
// Disallow HTML notifications from non-HTTP schemes. |
@@ -124,9 +128,10 @@ |
bool found = manager_.GetNotification(id, ¬ification); |
// |found| may be false if the WebNotification went out of scope in |
// the page before the associated toast was closed by the user. |
- if (found) |
+ if (found) { |
notification.dispatchCloseEvent(by_user); |
- manager_.UnregisterNotification(id); |
+ manager_.UnregisterNotification(id); |
+ } |
} |
void NotificationProvider::OnPermissionRequestComplete(int id) { |