Index: ui/message_center/notification_list.cc |
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc |
index ce2712e065209a874640e7f30728bf8b4ffae491..0b1a7326d8969af9376e7bd6abd0afa8cc3af3fa 100644 |
--- a/ui/message_center/notification_list.cc |
+++ b/ui/message_center/notification_list.cc |
@@ -38,6 +38,9 @@ bool CompareTimestampSerial::operator()(Notification* n1, Notification* n2) { |
const size_t NotificationList::kMaxVisibleMessageCenterNotifications = 100; |
const size_t NotificationList::kMaxVisiblePopupNotifications = 2; |
+NotificationList::Delegate::~Delegate() { |
+} |
+ |
NotificationList::NotificationList(Delegate* delegate) |
: delegate_(delegate), |
message_center_visible_(false), |
@@ -132,7 +135,7 @@ void NotificationList::SendRemoveNotificationsBySource( |
if ((*curiter)->display_source() == display_source) |
// This method is only called when the user is manipulating the admin |
// UI, so technically the removal is indirect. |
- delegate_->SendRemoveNotification((*curiter)->id(), false); |
+ delegate_->NotificationWasRemoved((*curiter)->id(), false); |
} |
} |
@@ -148,7 +151,7 @@ void NotificationList::SendRemoveNotificationsByExtension( |
if ((*curiter)->extension_id() == extension_id) |
// This method is only called when the user is manipulating the admin |
// UI, so technically the removal is indirect. |
- delegate_->SendRemoveNotification((*curiter)->id(), false); |
+ delegate_->NotificationWasRemoved((*curiter)->id(), false); |
} |
} |
@@ -157,7 +160,7 @@ bool NotificationList::SetNotificationIcon(const std::string& notification_id, |
Notifications::iterator iter = GetNotification(notification_id); |
if (iter == notifications_.end()) |
return false; |
- (*iter)->set_primary_icon(image); |
+ (*iter)->set_icon(image); |
return true; |
} |
@@ -247,6 +250,12 @@ void NotificationList::MarkSinglePopupAsShown( |
} |
} |
+void NotificationList::MarkNotificationAsExpanded(const std::string& id) { |
+ Notifications::iterator iter = GetNotification(id); |
+ if (iter != notifications_.end()) |
+ (*iter)->set_is_expanded(true); |
+} |
+ |
void NotificationList::SetQuietMode(bool quiet_mode) { |
SetQuietModeInternal(quiet_mode); |
quiet_mode_timer_.reset(); |