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

Unified Diff: chrome/browser/notifications/desktop_notification_service.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
Index: chrome/browser/notifications/desktop_notification_service.cc
===================================================================
--- chrome/browser/notifications/desktop_notification_service.cc (revision 30967)
+++ chrome/browser/notifications/desktop_notification_service.cc (working copy)
@@ -267,6 +267,16 @@
ui_manager_->Add(notification, profile_);
}
+bool DesktopNotificationService::CancelDesktopNotification(
+ int process_id, int route_id, int notification_id) {
+ scoped_refptr<NotificationObjectProxy> proxy(
+ new NotificationObjectProxy(process_id, route_id, notification_id,
+ false));
+ Notification notif(GURL(), GURL(), proxy);
+ return ui_manager_->Cancel(notif);
+}
+
+
bool DesktopNotificationService::ShowDesktopNotification(
const GURL& origin, const GURL& url, int process_id, int route_id,
NotificationSource source, int notification_id) {
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.h ('k') | chrome/browser/notifications/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698