| Index: ui/message_center/message_popup_bubble.cc
|
| diff --git a/ui/message_center/message_popup_bubble.cc b/ui/message_center/message_popup_bubble.cc
|
| index 3b27a4a81287b36055a08ac0c6fd0f50dfdd39dd..676da7f822cc0cdb0845e9d7d908bacabf78527d 100644
|
| --- a/ui/message_center/message_popup_bubble.cc
|
| +++ b/ui/message_center/message_popup_bubble.cc
|
| @@ -8,8 +8,8 @@
|
| #include "base/stl_util.h"
|
| #include "ui/message_center/message_view.h"
|
| #include "ui/message_center/notification.h"
|
| +#include "ui/message_center/notification_types.h"
|
| #include "ui/message_center/notification_view.h"
|
| -#include "ui/notifications/notification_types.h"
|
| #include "ui/views/bubble/tray_bubble_view.h"
|
| #include "ui/views/layout/box_layout.h"
|
| #include "ui/views/view.h"
|
| @@ -79,7 +79,7 @@ void PopupBubbleContentsView::Update(
|
| // The timer to call OnAutoClose for |notification|.
|
| class MessagePopupBubble::AutocloseTimer {
|
| public:
|
| - AutocloseTimer(const Notification& notification, MessagePopupBubble* bubble);
|
| + AutocloseTimer(Notification* notification, MessagePopupBubble* bubble);
|
|
|
| void Start();
|
|
|
| @@ -96,12 +96,12 @@ class MessagePopupBubble::AutocloseTimer {
|
| };
|
|
|
| MessagePopupBubble::AutocloseTimer::AutocloseTimer(
|
| - const Notification& notification,
|
| + Notification* notification,
|
| MessagePopupBubble* bubble)
|
| - : id_(notification.id),
|
| + : id_(notification->id()),
|
| bubble_(bubble) {
|
| int seconds = kAutocloseDefaultDelaySeconds;
|
| - if (notification.priority > ui::notifications::DEFAULT_PRIORITY)
|
| + if (notification->priority() > DEFAULT_PRIORITY)
|
| seconds = kAutocloseHighPriorityDelaySeconds;
|
| delay_ = base::TimeDelta::FromSeconds(seconds);
|
| }
|
| @@ -153,8 +153,8 @@ void MessagePopupBubble::OnBubbleViewDestroyed() {
|
| }
|
|
|
| void MessagePopupBubble::UpdateBubbleView() {
|
| - NotificationList::Notifications popups;
|
| - list_delegate()->GetNotificationList()->GetPopupNotifications(&popups);
|
| + NotificationList::Notifications popups =
|
| + list_delegate()->GetNotificationList()->GetPopupNotifications();
|
|
|
| if (popups.size() == 0) {
|
| if (bubble_view())
|
| @@ -172,15 +172,16 @@ void MessagePopupBubble::UpdateBubbleView() {
|
| // Start autoclose timers.
|
| for (NotificationList::Notifications::const_iterator iter = popups.begin();
|
| iter != popups.end(); ++iter) {
|
| + std::string id = (*iter)->id();
|
| std::map<std::string, AutocloseTimer*>::const_iterator timer_iter =
|
| - autoclose_timers_.find(iter->id);
|
| + autoclose_timers_.find(id);
|
| if (timer_iter == autoclose_timers_.end()) {
|
| AutocloseTimer *timer = new AutocloseTimer(*iter, this);
|
| - autoclose_timers_[iter->id] = timer;
|
| + autoclose_timers_[id] = timer;
|
| timer->Start();
|
| }
|
| - popup_ids_.insert(iter->id);
|
| - old_popup_ids.erase(iter->id);
|
| + popup_ids_.insert(id);
|
| + old_popup_ids.erase(id);
|
| }
|
|
|
| // Stops timers whose notifications are gone.
|
|
|