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

Side by Side Diff: chrome/browser/notifications/balloon_collection.h

Issue 5319011: Listen for APP_TERMINATING in notification ui; close windows earlier in the p... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698