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

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

Issue 6260040: Reapply and fix r73019. BalloonViewImpl has a different implemementation on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/notifications/balloon_collection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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 #pragma once 9 #pragma once
10 10
11 #include <deque> 11 #include <deque>
(...skipping 29 matching lines...) Expand all
41 LOWER_RIGHT = 1, 41 LOWER_RIGHT = 1,
42 UPPER_LEFT = 2, 42 UPPER_LEFT = 2,
43 LOWER_LEFT = 3, 43 LOWER_LEFT = 3,
44 44
45 // The default position is different on different platforms. 45 // The default position is different on different platforms.
46 DEFAULT_POSITION = -1 46 DEFAULT_POSITION = -1
47 }; 47 };
48 48
49 static BalloonCollection* Create(); 49 static BalloonCollection* Create();
50 50
51 BalloonCollection() 51 BalloonCollection();
52 : space_change_listener_(NULL) {
53 }
54 52
55 virtual ~BalloonCollection() {} 53 virtual ~BalloonCollection();
56 54
57 // Adds a new balloon for the specified notification. 55 // Adds a new balloon for the specified notification.
58 virtual void Add(const Notification& notification, 56 virtual void Add(const Notification& notification,
59 Profile* profile) = 0; 57 Profile* profile) = 0;
60 58
61 // Removes any balloons that have this notification id. Returns 59 // Removes any balloons that have this notification id. Returns
62 // true if anything was removed. 60 // true if anything was removed.
63 virtual bool RemoveById(const std::string& id) = 0; 61 virtual bool RemoveById(const std::string& id) = 0;
64 62
65 // Removes any balloons that have this source origin. Returns 63 // Removes any balloons that have this source origin. Returns
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 protected: 100 protected:
103 // Non-owned pointer to an object listening for space changes. 101 // Non-owned pointer to an object listening for space changes.
104 BalloonSpaceChangeListener* space_change_listener_; 102 BalloonSpaceChangeListener* space_change_listener_;
105 103
106 // For use only with testing. This callback is invoked when a balloon 104 // For use only with testing. This callback is invoked when a balloon
107 // is added or removed from the collection. 105 // is added or removed from the collection.
108 scoped_ptr<Callback0::Type> on_collection_changed_callback_; 106 scoped_ptr<Callback0::Type> on_collection_changed_callback_;
109 }; 107 };
110 108
111 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_ 109 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/balloon_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698