summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/balloon_collection.h
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 00:24:12 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 00:24:12 +0000
commit521b6efb91ea0c7cf11f4fc49c92fc32d8850595 (patch)
treeaf1c68798d74de08ec141b05ad65b1732dfae320 /chrome/browser/notifications/balloon_collection.h
parent16b59d5636b47694e846961165c5cd66e1f16976 (diff)
downloadchromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.zip
chromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.tar.gz
chromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.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 Review URL: http://codereview.chromium.org/4635007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/balloon_collection.h')
-rw-r--r--chrome/browser/notifications/balloon_collection.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/notifications/balloon_collection.h b/chrome/browser/notifications/balloon_collection.h
index 499b937..2d75686 100644
--- a/chrome/browser/notifications/balloon_collection.h
+++ b/chrome/browser/notifications/balloon_collection.h
@@ -9,11 +9,13 @@
#pragma once
#include <deque>
+#include <string>
#include "base/callback.h"
#include "base/scoped_ptr.h"
class Balloon;
+class GURL;
class Notification;
class Profile;
@@ -44,9 +46,13 @@ class BalloonCollection {
virtual void Add(const Notification& notification,
Profile* profile) = 0;
- // Removes a balloon from the collection if present. Returns
+ // Removes any balloons that have this notification id. Returns
// true if anything was removed.
- virtual bool Remove(const Notification& notification) = 0;
+ virtual bool RemoveById(const std::string& id) = 0;
+
+ // Removes any balloons that have this source origin. Returns
+ // true if anything was removed.
+ virtual bool RemoveBySourceOrigin(const GURL& source_origin) = 0;
// Is there room to add another notification?
virtual bool HasSpace() const = 0;