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

Side by Side Diff: ui/message_center/message_popup_bubble.cc

Issue 12326091: Made notification center notifications collapsed and expandable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/message_popup_bubble.h" 5 #include "ui/message_center/message_popup_bubble.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "ui/message_center/message_view.h" 9 #include "ui/message_center/message_view.h"
10 #include "ui/message_center/notification.h" 10 #include "ui/message_center/notification.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 void PopupBubbleContentsView::Update( 61 void PopupBubbleContentsView::Update(
62 const NotificationList::Notifications& popup_notifications) { 62 const NotificationList::Notifications& popup_notifications) {
63 content_->RemoveAllChildViews(true); 63 content_->RemoveAllChildViews(true);
64 for (NotificationList::Notifications::const_iterator iter = 64 for (NotificationList::Notifications::const_iterator iter =
65 popup_notifications.begin(); 65 popup_notifications.begin();
66 iter != popup_notifications.end(); ++iter) { 66 iter != popup_notifications.end(); ++iter) {
67 MessageView* view = 67 MessageView* view =
68 NotificationView::ViewForNotification(*iter, list_delegate_); 68 NotificationView::ViewForNotification(*iter, list_delegate_);
69 view->SetUpView(); 69 view->SetExpanded(true);
dharcourt 2013/02/23 04:32:00 NotificationViews are expanded by default in the p
Jun Mukai 2013/02/26 02:23:30 Can you leave this as comment?
dharcourt 2013/02/26 03:23:30 Done.
70 content_->AddChildView(view); 70 content_->AddChildView(view);
71 } 71 }
72 content_->SizeToPreferredSize(); 72 content_->SizeToPreferredSize();
73 content_->InvalidateLayout(); 73 content_->InvalidateLayout();
74 Layout(); 74 Layout();
75 if (GetWidget()) 75 if (GetWidget())
76 GetWidget()->GetRootView()->SchedulePaint(); 76 GetWidget()->GetRootView()->SchedulePaint();
77 } 77 }
78 78
79 // The timer to call OnAutoClose for |notification|. 79 // The timer to call OnAutoClose for |notification|.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 scoped_ptr<AutocloseTimer> release_timer(iter->second); 217 scoped_ptr<AutocloseTimer> release_timer(iter->second);
218 autoclose_timers_.erase(iter); 218 autoclose_timers_.erase(iter);
219 } 219 }
220 } 220 }
221 221
222 size_t MessagePopupBubble::NumMessageViewsForTest() const { 222 size_t MessagePopupBubble::NumMessageViewsForTest() const {
223 return contents_view_->NumMessageViews(); 223 return contents_view_->NumMessageViews();
224 } 224 }
225 225
226 } // namespace message_center 226 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698