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

Unified Diff: ui/message_center/notification_list.cc

Issue 1986493002: Show message center on lock screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: ui/message_center/notification_list.cc
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc
index 14abd9b5c420b4a5994288acd9524248ec2a3ff5..a07d78c05f0683c376b9d2f637a9a4b112191f10 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -63,19 +63,16 @@ NotificationList::~NotificationList() {
STLDeleteContainerPointers(notifications_.begin(), notifications_.end());
}
-void NotificationList::SetMessageCenterVisible(
- bool visible,
- std::set<std::string>* updated_ids) {
- if (message_center_visible_ == visible)
- return;
-
+void NotificationList::SetMessageCenterVisible(bool visible) {
message_center_visible_ = visible;
dewittj 2016/05/19 17:34:03 This doesn't seem like the right place to track th
yoshiki 2016/05/24 17:00:14 I moved the flag from NotificationList to MessageC
+}
- if (!visible)
- return;
+void NotificationList::SetNotificationsShown(
yoshiki 2016/05/16 19:04:46 I splitted this method because I don't want to mak
+ const NotificationBlockers& blockers,
yoshiki 2016/05/16 19:04:46 Adding blockers fixes the bug that this makes bloc
+ std::set<std::string>* updated_ids) {
+ Notifications notifications = GetVisibleNotifications(blockers);
- for (Notifications::iterator iter = notifications_.begin();
- iter != notifications_.end(); ++iter) {
+ for (auto iter = notifications.begin(); iter != notifications.end(); ++iter) {
Notification* notification = *iter;
bool was_popup = notification->shown_as_popup();
bool was_read = notification->IsRead();

Powered by Google App Engine
This is Rietveld 408576698