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

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

Issue 2868793002: Delete MessageViews cleared by "Clear All" after animation. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | ui/message_center/views/message_list_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_list_view.cc
diff --git a/ui/message_center/views/message_list_view.cc b/ui/message_center/views/message_list_view.cc
index 653b3f825a6fea4004c1f07a230e1f38bc848424..51139d22fe9c870930d30a9a12df78ddedf28eb7 100644
--- a/ui/message_center/views/message_list_view.cc
+++ b/ui/message_center/views/message_list_view.cc
@@ -560,6 +560,9 @@ void MessageListView::AnimateClearingOneNotification() {
new_bounds.set_x(new_bounds.right() + kMarginBetweenItems);
animator_.AnimateViewTo(child, new_bounds);
+ // Deleting the child after animation.
+ deleted_when_done_.insert(child);
+
// Schedule to start sliding out next notification after a short delay.
if (!clearing_all_views_.empty()) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
« no previous file with comments | « no previous file | ui/message_center/views/message_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698