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

Unified Diff: ui/message_center/notification_list.cc

Issue 12326091: Made notification center notifications collapsed and expandable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, rebase, and rebase again! Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/notification_list.h ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification_list.cc
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc
index 4f0c69a1b8911ca8644780d0da0af7ef1d3b8662..2e108f914406d80ab919c857dd40ead5153cf59b 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),
@@ -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();
« no previous file with comments | « ui/message_center/notification_list.h ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698