OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 Profile* profile) = 0; | 47 Profile* profile) = 0; |
48 | 48 |
49 // Removes any balloons that have this notification id. Returns | 49 // Removes any balloons that have this notification id. Returns |
50 // true if anything was removed. | 50 // true if anything was removed. |
51 virtual bool RemoveById(const std::string& id) = 0; | 51 virtual bool RemoveById(const std::string& id) = 0; |
52 | 52 |
53 // Removes any balloons that have this source origin. Returns | 53 // Removes any balloons that have this source origin. Returns |
54 // true if anything was removed. | 54 // true if anything was removed. |
55 virtual bool RemoveBySourceOrigin(const GURL& source_origin) = 0; | 55 virtual bool RemoveBySourceOrigin(const GURL& source_origin) = 0; |
56 | 56 |
| 57 // Removes all balloons. |
| 58 virtual void RemoveAll() = 0; |
| 59 |
57 // Is there room to add another notification? | 60 // Is there room to add another notification? |
58 virtual bool HasSpace() const = 0; | 61 virtual bool HasSpace() const = 0; |
59 | 62 |
60 // Request the resizing of a balloon. | 63 // Request the resizing of a balloon. |
61 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) = 0; | 64 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) = 0; |
62 | 65 |
63 // Update for new screen dimensions. | 66 // Update for new screen dimensions. |
64 virtual void DisplayChanged() = 0; | 67 virtual void DisplayChanged() = 0; |
65 | 68 |
66 // Inform the collection that a balloon was closed. | 69 // Inform the collection that a balloon was closed. |
(...skipping 17 matching lines...) Expand all Loading... |
84 protected: | 87 protected: |
85 // Non-owned pointer to an object listening for space changes. | 88 // Non-owned pointer to an object listening for space changes. |
86 BalloonSpaceChangeListener* space_change_listener_; | 89 BalloonSpaceChangeListener* space_change_listener_; |
87 | 90 |
88 // For use only with testing. This callback is invoked when a balloon | 91 // For use only with testing. This callback is invoked when a balloon |
89 // is added or removed from the collection. | 92 // is added or removed from the collection. |
90 scoped_ptr<Callback0::Type> on_collection_changed_callback_; | 93 scoped_ptr<Callback0::Type> on_collection_changed_callback_; |
91 }; | 94 }; |
92 | 95 |
93 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ | 96 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ |
OLD | NEW |