summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc9
-rw-r--r--chrome/browser/renderer_host/render_view_host.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 5c5b120..a2749a7 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -831,6 +831,8 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
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 @@ void RenderViewHost::OnShowDesktopNotificationText(const GURL& source_origin,
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 =
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 6d1dfc8..7d9337f 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -585,6 +585,7 @@ class RenderViewHost : public RenderWidgetHost,
const string16& title,
const string16& text,
int notification_id);
+ void OnCancelDesktopNotification(int notification_id);
void OnRequestNotificationPermission(const GURL& origin, int callback_id);
void OnExtensionRequest(const std::string& name, const ListValue& args,