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

Unified Diff: chrome/browser/notifications/balloon_collection_base.h

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 months 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/balloon_collection_base.h
===================================================================
--- chrome/browser/notifications/balloon_collection_base.h (revision 263121)
+++ chrome/browser/notifications/balloon_collection_base.h (working copy)
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Handles the visible notification (or balloons).
-
-#ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_BASE_H_
-#define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_BASE_H_
-
-#include <deque>
-#include <string>
-
-#include "base/basictypes.h"
-
-class Balloon;
-class GURL;
-class Notification;
-class Profile;
-
-// This class provides support for implementing a BalloonCollection
-// including the parts common between Chrome UI and ChromeOS UI.
-class BalloonCollectionBase {
- public:
- BalloonCollectionBase();
- virtual ~BalloonCollectionBase();
-
- typedef std::deque<Balloon*> Balloons;
-
- // Adds a balloon to the collection. Takes ownership of pointer.
- virtual void Add(Balloon* balloon, bool add_to_front);
-
- // Removes a balloon from the collection (if present). Frees
- // the pointer after removal.
- virtual void Remove(Balloon* balloon);
-
- // Returns true if any balloon matches the given notification id.
- virtual const Notification* FindById(const std::string& id) const;
-
- // Finds any balloon matching the given notification id, and
- // calls CloseByScript on it. Returns true if anything was
- // found.
- virtual bool CloseById(const std::string& id);
-
- // Finds all balloons matching the given notification source,
- // and calls CloseByScript on them. Returns true if anything
- // was found.
- virtual bool CloseAllBySourceOrigin(const GURL& source_origin);
-
- // Finds all balloons matching the given profile and calls CloseByScript
- // on them. Returns true if anything was found.
- virtual bool CloseAllByProfile(Profile* profile);
-
- // Calls CloseByScript on all balloons.
- virtual void CloseAll();
-
- const Balloons& balloons() const { return balloons_; }
-
- // Returns the balloon matching the given notification id, or
- // NULL if there is no matching balloon.
- Balloon* FindBalloonById(const std::string& notification_id);
-
- // Returns the balloon matching the given notification, or
- // NULL if there is no matching balloon.
- Balloon* FindBalloon(const Notification& notification);
-
- // The number of balloons being displayed.
- int count() const { return static_cast<int>(balloons_.size()); }
-
- private:
- // Queue of active balloons. Pointers are owned by this class.
- Balloons balloons_;
-
- DISALLOW_COPY_AND_ASSIGN(BalloonCollectionBase);
-};
-
-#endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_BASE_H_
« no previous file with comments | « chrome/browser/notifications/balloon_collection.cc ('k') | chrome/browser/notifications/balloon_collection_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698