| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Handles the visible notification (or balloons). | 5 // Handles the visible notification (or balloons). |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ | 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ |
| 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ | 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Profile* profile) = 0; | 55 Profile* profile) = 0; |
| 56 | 56 |
| 57 // Removes any balloons that have this notification id. Returns | 57 // Removes any balloons that have this notification id. Returns |
| 58 // true if anything was removed. | 58 // true if anything was removed. |
| 59 virtual bool RemoveById(const std::string& id) = 0; | 59 virtual bool RemoveById(const std::string& id) = 0; |
| 60 | 60 |
| 61 // Removes any balloons that have this source origin. Returns | 61 // Removes any balloons that have this source origin. Returns |
| 62 // true if anything was removed. | 62 // true if anything was removed. |
| 63 virtual bool RemoveBySourceOrigin(const GURL& source_origin) = 0; | 63 virtual bool RemoveBySourceOrigin(const GURL& source_origin) = 0; |
| 64 | 64 |
| 65 // Removes any balloons matching |profile. Returns true if any were removed. |
| 66 virtual bool RemoveByProfile(Profile* profile) = 0; |
| 67 |
| 65 // Removes all balloons. | 68 // Removes all balloons. |
| 66 virtual void RemoveAll() = 0; | 69 virtual void RemoveAll() = 0; |
| 67 | 70 |
| 68 // Is there room to add another notification? | 71 // Is there room to add another notification? |
| 69 virtual bool HasSpace() const = 0; | 72 virtual bool HasSpace() const = 0; |
| 70 | 73 |
| 71 // Request the resizing of a balloon. | 74 // Request the resizing of a balloon. |
| 72 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) = 0; | 75 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) = 0; |
| 73 | 76 |
| 74 // Set the position preference for the collection. | 77 // Set the position preference for the collection. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 98 protected: | 101 protected: |
| 99 // Non-owned pointer to an object listening for space changes. | 102 // Non-owned pointer to an object listening for space changes. |
| 100 BalloonSpaceChangeListener* space_change_listener_; | 103 BalloonSpaceChangeListener* space_change_listener_; |
| 101 | 104 |
| 102 // For use only with testing. This callback is invoked when a balloon | 105 // For use only with testing. This callback is invoked when a balloon |
| 103 // is added or removed from the collection. | 106 // is added or removed from the collection. |
| 104 base::Closure on_collection_changed_callback_; | 107 base::Closure on_collection_changed_callback_; |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ | 110 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ |
| OLD | NEW |