OLD | NEW |
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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 class Notification; | 32 class Notification; |
33 class NotificationDelegate; | 33 class NotificationDelegate; |
34 struct NotifierId; | 34 struct NotifierId; |
35 | 35 |
36 // Comparers used to auto-sort the lists of Notifications. | 36 // Comparers used to auto-sort the lists of Notifications. |
37 struct MESSAGE_CENTER_EXPORT ComparePriorityTimestampSerial { | 37 struct MESSAGE_CENTER_EXPORT ComparePriorityTimestampSerial { |
38 bool operator()(Notification* n1, Notification* n2); | 38 bool operator()(Notification* n1, Notification* n2); |
39 }; | 39 }; |
40 | 40 |
41 struct CompareTimestampSerial { | 41 struct MESSAGE_CENTER_EXPORT CompareTimestampSerial { |
42 bool operator()(Notification* n1, Notification* n2); | 42 bool operator()(Notification* n1, Notification* n2); |
43 }; | 43 }; |
44 | 44 |
45 // A helper class to manage the list of notifications. | 45 // A helper class to manage the list of notifications. |
46 class MESSAGE_CENTER_EXPORT NotificationList { | 46 class MESSAGE_CENTER_EXPORT NotificationList { |
47 public: | 47 public: |
48 // Auto-sorted set. Matches the order in which Notifications are shown in | 48 // Auto-sorted set. Matches the order in which Notifications are shown in |
49 // Notification Center. | 49 // Notification Center. |
50 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications; | 50 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications; |
51 | 51 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 Notifications notifications_; | 150 Notifications notifications_; |
151 bool message_center_visible_; | 151 bool message_center_visible_; |
152 bool quiet_mode_; | 152 bool quiet_mode_; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 154 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
155 }; | 155 }; |
156 | 156 |
157 } // namespace message_center | 157 } // namespace message_center |
158 | 158 |
159 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 159 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
OLD | NEW |