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

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

Issue 11926032: Updated the look of web and basic notifications to match latest mockups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « ui/message_center/message_center_bubble.cc ('k') | ui/message_center/message_simple_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/message_center/message_view.h" 8 #include "ui/message_center/message_view.h"
9 #include "ui/message_center/message_view_factory.h" 9 #include "ui/message_center/notification_view.h"
10 #include "ui/notifications/notification_types.h" 10 #include "ui/notifications/notification_types.h"
11 #include "ui/views/bubble/tray_bubble_view.h" 11 #include "ui/views/bubble/tray_bubble_view.h"
12 #include "ui/views/layout/box_layout.h" 12 #include "ui/views/layout/box_layout.h"
13 #include "ui/views/view.h" 13 #include "ui/views/view.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 15
16 namespace message_center { 16 namespace message_center {
17 namespace { 17 namespace {
18 18
19 const int kAutocloseHighPriorityDelaySeconds = 25; 19 const int kAutocloseHighPriorityDelaySeconds = 25;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 content_->layer()->SetMasksToBounds(true); 57 content_->layer()->SetMasksToBounds(true);
58 } 58 }
59 } 59 }
60 60
61 void Update(const NotificationList::Notifications& popup_notifications) { 61 void Update(const NotificationList::Notifications& popup_notifications) {
62 content_->RemoveAllChildViews(true); 62 content_->RemoveAllChildViews(true);
63 for (NotificationList::Notifications::const_iterator iter = 63 for (NotificationList::Notifications::const_iterator iter =
64 popup_notifications.begin(); 64 popup_notifications.begin();
65 iter != popup_notifications.end(); ++iter) { 65 iter != popup_notifications.end(); ++iter) {
66 MessageView* view = 66 MessageView* view =
67 MessageViewFactory::ViewForNotification(*iter, list_delegate_); 67 NotificationView::ViewForNotification(*iter, list_delegate_);
68 view->SetUpView(); 68 view->SetUpView();
69 content_->AddChildView(view); 69 content_->AddChildView(view);
70 } 70 }
71 content_->SizeToPreferredSize(); 71 content_->SizeToPreferredSize();
72 content_->InvalidateLayout(); 72 content_->InvalidateLayout();
73 Layout(); 73 Layout();
74 if (GetWidget()) 74 if (GetWidget())
75 GetWidget()->GetRootView()->SchedulePaint(); 75 GetWidget()->GetRootView()->SchedulePaint();
76 } 76 }
77 77
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 else 196 else
197 should_run_default_timer_ = false; 197 should_run_default_timer_ = false;
198 UpdateBubbleView(); 198 UpdateBubbleView();
199 } 199 }
200 200
201 size_t MessagePopupBubble::NumMessageViewsForTest() const { 201 size_t MessagePopupBubble::NumMessageViewsForTest() const {
202 return contents_view_->NumMessageViews(); 202 return contents_view_->NumMessageViews();
203 } 203 }
204 204
205 } // namespace message_center 205 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center_bubble.cc ('k') | ui/message_center/message_simple_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698