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

Side by Side Diff: ui/message_center/views/message_center_view.cc

Issue 264123002: Google Now Message Center Stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/views/message_center_view.h" 5 #include "ui/message_center/views/message_center_view.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 if (is_closing_) 613 if (is_closing_)
614 return; 614 return;
615 615
616 notification_views_.clear(); 616 notification_views_.clear();
617 617
618 int index = 0; 618 int index = 0;
619 for (NotificationList::Notifications::const_iterator iter = 619 for (NotificationList::Notifications::const_iterator iter =
620 notifications.begin(); iter != notifications.end(); ++iter) { 620 notifications.begin(); iter != notifications.end(); ++iter) {
621 AddNotificationAt(*(*iter), index++); 621 AddNotificationAt(*(*iter), index++);
622 622
623 message_center_->DisplayedNotification((*iter)->id()); 623 message_center_->DisplayedNotification(
624 (*iter)->id(), message_center::MESSAGE_CENTER);
624 if (notification_views_.size() >= kMaxVisibleMessageCenterNotifications) 625 if (notification_views_.size() >= kMaxVisibleMessageCenterNotifications)
625 break; 626 break;
626 } 627 }
627 628
628 NotificationsChanged(); 629 NotificationsChanged();
629 scroller_->RequestFocus(); 630 scroller_->RequestFocus();
630 } 631 }
631 632
632 void MessageCenterView::SetSettingsVisible(bool visible) { 633 void MessageCenterView::SetSettingsVisible(bool visible) {
633 if (is_closing_) 634 if (is_closing_)
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 scroller_->InvalidateLayout(); 1003 scroller_->InvalidateLayout();
1003 PreferredSizeChanged(); 1004 PreferredSizeChanged();
1004 Layout(); 1005 Layout();
1005 } 1006 }
1006 1007
1007 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { 1008 void MessageCenterView::SetNotificationViewForTest(MessageView* view) {
1008 message_list_view_->AddNotificationAt(view, 0); 1009 message_list_view_->AddNotificationAt(view, 0);
1009 } 1010 }
1010 1011
1011 } // namespace message_center 1012 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698