Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6998)

Unified Diff: chrome/renderer/notification_provider.cc

Issue 549140: If a page is navigated within the same render process, the active notificatio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/notification_provider.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, &notification);
// |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) {
« no previous file with comments | « chrome/renderer/notification_provider.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698