diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 00:24:12 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 00:24:12 +0000 |
commit | 521b6efb91ea0c7cf11f4fc49c92fc32d8850595 (patch) | |
tree | af1c68798d74de08ec141b05ad65b1732dfae320 /chrome/browser/cocoa | |
parent | 16b59d5636b47694e846961165c5cd66e1f16976 (diff) | |
download | chromium_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/cocoa')
-rw-r--r-- | chrome/browser/cocoa/notifications/balloon_controller.mm | 1 | ||||
-rw-r--r-- | chrome/browser/cocoa/notifications/balloon_controller_unittest.mm | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/notifications/balloon_controller.mm b/chrome/browser/cocoa/notifications/balloon_controller.mm index 3f8a8b0..048888c 100644 --- a/chrome/browser/cocoa/notifications/balloon_controller.mm +++ b/chrome/browser/cocoa/notifications/balloon_controller.mm @@ -17,6 +17,7 @@ #include "chrome/browser/cocoa/notifications/balloon_view_host_mac.h" #include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/desktop_notification_service.h" +#include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_options_menu_model.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" diff --git a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm index 6f6a1ab..31f7c15 100644 --- a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm +++ b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm @@ -30,7 +30,8 @@ namespace { class MockBalloonCollection : public BalloonCollection { virtual void Add(const Notification& notification, Profile* profile) {} - virtual bool Remove(const Notification& notification) { return false; } + virtual bool RemoveById(const std::string& id) { return false; } + virtual bool RemoveBySourceOrigin(const GURL& origin) { return false; } virtual bool HasSpace() const { return true; } virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) {}; virtual void DisplayChanged() {} |