Index: ui/message_center/message_simple_view.cc |
diff --git a/ui/message_center/message_simple_view.cc b/ui/message_center/message_simple_view.cc |
index 94e138422cba77b351aeef4ea3736a9dea1dc648..8f85b458ae119af6a4a91264ecf79f2fb5401ca5 100644 |
--- a/ui/message_center/message_simple_view.cc |
+++ b/ui/message_center/message_simple_view.cc |
@@ -31,6 +31,7 @@ MessageSimpleView::MessageSimpleView( |
close->SetImageAlignment(views::ImageButton::ALIGN_CENTER, |
views::ImageButton::ALIGN_MIDDLE); |
old_style_close_button_.reset(close); |
+ SetUpView(notification); |
} |
MessageSimpleView::~MessageSimpleView() { |
@@ -59,20 +60,20 @@ gfx::Size MessageSimpleView::GetPreferredSize() { |
return size; |
} |
-void MessageSimpleView::SetUpView() { |
+void MessageSimpleView::SetUpView(const Notification& notification) { |
views::ImageView* icon = new views::ImageView; |
icon->SetImageSize( |
gfx::Size(kWebNotificationIconSize, kWebNotificationIconSize)); |
- icon->SetImage(notification().primary_icon); |
+ icon->SetImage(notification.primary_icon()); |
- views::Label* title = new views::Label(notification().title); |
+ views::Label* title = new views::Label(notification.title()); |
title->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
title->SetFont(title->font().DeriveFont(0, gfx::Font::BOLD)); |
- views::Label* message = new views::Label(notification().message); |
+ views::Label* message = new views::Label(notification.message()); |
message->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
message->SetMultiLine(true); |
- SkColor bg_color = notification().is_read ? |
+ SkColor bg_color = notification.is_read() ? |
kNotificationReadColor : kNotificationColor; |
content_view_.reset(new views::View); |
content_view_->set_background( |