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

Unified Diff: ui/message_center/views/message_popup_collection.cc

Issue 271773002: Retain popup bubble mouse status even through updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/views/message_popup_collection.cc
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index f5103a96994b0081e51cfdb4b0bef5ebd1bdb17a..9e49a51fa2d890da1e933da87d3805d5b6b23988 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -449,20 +449,22 @@ void MessagePopupCollection::OnNotificationUpdated(
for (NotificationList::PopupNotifications::iterator iter =
notifications.begin(); iter != notifications.end(); ++iter) {
- if ((*iter)->id() != notification_id)
+ Notification* notification = *iter;
+ DCHECK(notification);
+ ToastContentsView* toast_contents_view = *toast_iter;
+ DCHECK(toast_contents_view);
+
+ if (notification->id() != notification_id)
continue;
const RichNotificationData& optional_fields =
- (*iter)->rich_notification_data();
+ notification->rich_notification_data();
bool a11y_feedback_for_updates =
optional_fields.should_make_spoken_feedback_for_popup_updates;
- NotificationView* view =
- NotificationView::Create(*toast_iter,
- *(*iter),
- true); // Create top-level notification.
- view->set_context_menu_controller(context_menu_controller_.get());
- (*toast_iter)->SetContents(view, a11y_feedback_for_updates);
+ toast_contents_view->UpdateContents(*notification,
+ a11y_feedback_for_updates);
+
updated = true;
}

Powered by Google App Engine
This is Rietveld 408576698