summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/notification_ui_manager.h
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 22:21:08 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 22:21:08 +0000
commit24c5013fa5b10020a929af1e44eb7bde3c63b309 (patch)
treeae787d4ae68ba46760645c57951dcd71e225ccb7 /chrome/browser/notifications/notification_ui_manager.h
parent8656ff1fa04f542c7c775cccfe736146daa343ec (diff)
downloadchromium_src-24c5013fa5b10020a929af1e44eb7bde3c63b309.zip
chromium_src-24c5013fa5b10020a929af1e44eb7bde3c63b309.tar.gz
chromium_src-24c5013fa5b10020a929af1e44eb7bde3c63b309.tar.bz2
When an extension is uninstalled, close all desktop notifications from that extension.
This change also refactors the balloon collection code to remove duplication between chrome and chromeos. Removes some gross removal code which was using fake notifications just to get the right ID. BUG=58266 TEST=open notifications from extension, uninstall extensions Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65879 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66571 Review URL: http://codereview.chromium.org/4635007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/notification_ui_manager.h')
-rw-r--r--chrome/browser/notifications/notification_ui_manager.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/notifications/notification_ui_manager.h b/chrome/browser/notifications/notification_ui_manager.h
index 10687a9..6d46198 100644
--- a/chrome/browser/notifications/notification_ui_manager.h
+++ b/chrome/browser/notifications/notification_ui_manager.h
@@ -7,6 +7,7 @@
#pragma once
#include <deque>
+#include <string>
#include "base/id_map.h"
#include "base/scoped_ptr.h"
@@ -43,8 +44,14 @@ class NotificationUIManager
virtual void Add(const Notification& notification,
Profile* profile);
- // Removes a notification.
- virtual bool Cancel(const Notification& notification);
+ // Removes any notifications matching the supplied ID, either currently
+ // displayed or in the queue. Returns true if anything was removed.
+ virtual bool CancelById(const std::string& notification_id);
+
+ // Removes any notifications matching the supplied source origin
+ // (which could be an extension ID), either currently displayed or in the
+ // queue. Returns true if anything was removed.
+ virtual bool CancelAllBySourceOrigin(const GURL& source_origin);
// Returns balloon collection.
BalloonCollection* balloon_collection() {