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

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

Issue 11827010: Fixes the policy to choose the notifications for popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool GetNotification(const std::string& id, Notifications::iterator* iter); 174 bool GetNotification(const std::string& id, Notifications::iterator* iter);
175 175
176 void EraseNotification(Notifications::iterator iter); 176 void EraseNotification(Notifications::iterator iter);
177 177
178 void PushNotification(Notification& notification); 178 void PushNotification(Notification& notification);
179 179
180 // Returns the recent notifications of the |priority| that have not been shown 180 // Returns the recent notifications of the |priority| that have not been shown
181 // as a popup. kMaxVisiblePopupNotifications are used to limit the number of 181 // as a popup. kMaxVisiblePopupNotifications are used to limit the number of
182 // notifications for the default priority. 182 // notifications for the default priority.
183 void GetPopupIterators(int priority, 183 void GetPopupIterators(int priority,
184 Notifications::iterator& first, 184 Notifications::iterator* first,
185 Notifications::iterator& last); 185 Notifications::iterator* last);
186 186
187 // Given a dictionary of optional notification fields (or NULL), unpacks all 187 // Given a dictionary of optional notification fields (or NULL), unpacks all
188 // recognized values into the given Notification struct. We assume prior 188 // recognized values into the given Notification struct. We assume prior
189 // proper initialization of |notification| fields that correspond to 189 // proper initialization of |notification| fields that correspond to
190 // |optional_fields|. 190 // |optional_fields|.
191 void UnpackOptionalFields(const base::DictionaryValue* optional_fields, 191 void UnpackOptionalFields(const base::DictionaryValue* optional_fields,
192 Notification* notification); 192 Notification* notification);
193 193
194 // Sets the current quiet mode status to |quiet_mode|. 194 // Sets the current quiet mode status to |quiet_mode|.
195 void SetQuietModeInternal(bool quiet_mode); 195 void SetQuietModeInternal(bool quiet_mode);
196 196
197 Delegate* delegate_; 197 Delegate* delegate_;
198 NotificationMap notifications_; 198 NotificationMap notifications_;
199 bool message_center_visible_; 199 bool message_center_visible_;
200 size_t unread_count_; 200 size_t unread_count_;
201 bool quiet_mode_; 201 bool quiet_mode_;
202 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; 202 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(NotificationList); 204 DISALLOW_COPY_AND_ASSIGN(NotificationList);
205 }; 205 };
206 206
207 } // namespace message_center 207 } // namespace message_center
208 208
209 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ 209 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/notification_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698