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

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

Issue 14299007: Sends Updated when message center is closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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_impl.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Notification Center. 42 // Notification Center.
43 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications; 43 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications;
44 44
45 // Auto-sorted set used to return the Notifications to be shown as popup 45 // Auto-sorted set used to return the Notifications to be shown as popup
46 // toasts. 46 // toasts.
47 typedef std::set<Notification*, CompareTimestampSerial> PopupNotifications; 47 typedef std::set<Notification*, CompareTimestampSerial> PopupNotifications;
48 48
49 explicit NotificationList(); 49 explicit NotificationList();
50 virtual ~NotificationList(); 50 virtual ~NotificationList();
51 51
52 // Affects whether or not a message has been "read". 52 // Affects whether or not a message has been "read". Collects the set of
53 void SetMessageCenterVisible(bool visible); 53 // ids whose state have changed and set to |udpated_ids|. NULL if updated
54 // ids don't matter.
55 void SetMessageCenterVisible(bool visible,
56 std::set<std::string>* updated_ids);
54 57
55 void AddNotification(NotificationType type, 58 void AddNotification(NotificationType type,
56 const std::string& id, 59 const std::string& id,
57 const string16& title, 60 const string16& title,
58 const string16& message, 61 const string16& message,
59 const string16& display_source, 62 const string16& display_source,
60 const std::string& extension_id, 63 const std::string& extension_id,
61 const base::DictionaryValue* optional_fields); 64 const base::DictionaryValue* optional_fields);
62 65
63 void UpdateNotificationMessage(const std::string& old_id, 66 void UpdateNotificationMessage(const std::string& old_id,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 size_t unread_count_; 149 size_t unread_count_;
147 bool quiet_mode_; 150 bool quiet_mode_;
148 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; 151 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_;
149 152
150 DISALLOW_COPY_AND_ASSIGN(NotificationList); 153 DISALLOW_COPY_AND_ASSIGN(NotificationList);
151 }; 154 };
152 155
153 } // namespace message_center 156 } // namespace message_center
154 157
155 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ 158 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/notification_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698