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

Side by Side Diff: ui/message_center/notification_list.h

Issue 14327004: Moved some message center constants to message_center_constants.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/message_center_constants.cc ('k') | ui/message_center/notification_list.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ 6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Sets the current quiet mode to true. The quiet mode will expire in the 121 // Sets the current quiet mode to true. The quiet mode will expire in the
122 // specified time-delta from now. 122 // specified time-delta from now.
123 void EnterQuietModeWithExpire(const base::TimeDelta& expires_in); 123 void EnterQuietModeWithExpire(const base::TimeDelta& expires_in);
124 124
125 // Returns all notifications, in a (priority-timestamp) order. Suitable for 125 // Returns all notifications, in a (priority-timestamp) order. Suitable for
126 // rendering notifications in a NotificationCenter. 126 // rendering notifications in a NotificationCenter.
127 const Notifications& GetNotifications(); 127 const Notifications& GetNotifications();
128 size_t NotificationCount() const; 128 size_t NotificationCount() const;
129 size_t unread_count() const { return unread_count_; } 129 size_t unread_count() const { return unread_count_; }
130 130
131 static const size_t kMaxVisiblePopupNotifications;
132 static const size_t kMaxVisibleMessageCenterNotifications;
133
134 private: 131 private:
135 friend class test::NotificationListTest; 132 friend class test::NotificationListTest;
136 133
137 // Iterates through the list and returns the first notification matching |id|. 134 // Iterates through the list and returns the first notification matching |id|.
138 Notifications::iterator GetNotification(const std::string& id); 135 Notifications::iterator GetNotification(const std::string& id);
139 136
140 void EraseNotification(Notifications::iterator iter); 137 void EraseNotification(Notifications::iterator iter);
141 138
142 void PushNotification(scoped_ptr<Notification> notification); 139 void PushNotification(scoped_ptr<Notification> notification);
143 140
144 // Sets the current quiet mode status to |quiet_mode|. 141 // Sets the current quiet mode status to |quiet_mode|.
145 void SetQuietModeInternal(bool quiet_mode); 142 void SetQuietModeInternal(bool quiet_mode);
146 143
147 Notifications notifications_; 144 Notifications notifications_;
148 bool message_center_visible_; 145 bool message_center_visible_;
149 size_t unread_count_; 146 size_t unread_count_;
150 bool quiet_mode_; 147 bool quiet_mode_;
151 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; 148 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_;
152 149
153 DISALLOW_COPY_AND_ASSIGN(NotificationList); 150 DISALLOW_COPY_AND_ASSIGN(NotificationList);
154 }; 151 };
155 152
156 } // namespace message_center 153 } // namespace message_center
157 154
158 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ 155 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_constants.cc ('k') | ui/message_center/notification_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698