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

Unified Diff: chrome/browser/chromeos/notifications/balloon_collection_impl.h

Issue 4635007: When an extension is uninstalled, close all desktop notifications from that e... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: lint fixes Created 10 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/chromeos/notifications/balloon_collection_impl.h
===================================================================
--- chrome/browser/chromeos/notifications/balloon_collection_impl.h (revision 65581)
+++ chrome/browser/chromeos/notifications/balloon_collection_impl.h (working copy)
@@ -60,12 +60,13 @@
// BalloonCollectionInterface overrides
virtual void Add(const Notification& notification,
Profile* profile);
- virtual bool Remove(const Notification& notification);
+ virtual bool RemoveById(const std::string& id);
+ virtual bool RemoveBySourceOrigin(const GURL& origin);
virtual bool HasSpace() const;
virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size);
virtual void DisplayChanged() {}
virtual void OnBalloonClosed(Balloon* source);
- virtual const Balloons& GetActiveBalloons() { return balloons_; }
+ virtual const Balloons& GetActiveBalloons() { return base_.balloons(); }
// NotificationObserver overrides:
virtual void Observe(NotificationType type,
@@ -115,20 +116,15 @@
virtual Balloon* MakeBalloon(const Notification& notification,
Profile* profile);
+ // Base implementation for the collection of active balloons.
+ BalloonCollectionBase base_;
+
private:
friend class NotificationPanelTester;
// Shutdown the notification ui.
void Shutdown();
- // The number of balloons being displayed.
- int count() const { return balloons_.size(); }
-
- Balloons::iterator FindBalloon(const Notification& notification);
-
- // Queue of active balloons.
- Balloons balloons_;
-
scoped_ptr<NotificationUI> notification_ui_;
NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698