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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 363003: Implement cancel() API on a Notification object so that script can cancel or ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/browser/renderer_host/render_view_host.h ('k') | chrome/browser/views/notifications/balloon_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 30967)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -831,6 +831,8 @@
OnShowDesktopNotification)
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDesktopNotificationText,
OnShowDesktopNotificationText)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_CancelDesktopNotification,
+ OnCancelDesktopNotification)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestNotificationPermission,
OnRequestNotificationPermission)
IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRequest, OnExtensionRequest)
@@ -1677,6 +1679,13 @@
DesktopNotificationService::PageNotification, notification_id);
}
+void RenderViewHost::OnCancelDesktopNotification(int notification_id) {
+ DesktopNotificationService* service=
+ process()->profile()->GetDesktopNotificationService();
+ service->CancelDesktopNotification(
+ process()->id(), routing_id(), notification_id);
+}
+
void RenderViewHost::OnRequestNotificationPermission(
const GURL& source_origin, int callback_context) {
DesktopNotificationService* service =
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/views/notifications/balloon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698