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

Unified Diff: ui/message_center/message_simple_view.cc

Issue 12277024: Notificaitons refactor step 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback 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 side-by-side diff with in-line comments
Download patch
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..76e6abe367cd634291b74d7ffb05f811ce8bc4df 100644
--- a/ui/message_center/message_simple_view.cc
+++ b/ui/message_center/message_simple_view.cc
@@ -22,7 +22,7 @@ const SkColor kNotificationReadColor = SkColorSetRGB(0xfa, 0xfa, 0xfa);
MessageSimpleView::MessageSimpleView(
NotificationList::Delegate* list_delegate,
- const Notification& notification)
+ Notification* notification)
: MessageView(list_delegate, notification) {
views::ImageButton* close = new views::ImageButton(this);
close->SetImage(
@@ -63,16 +63,16 @@ void MessageSimpleView::SetUpView() {
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(

Powered by Google App Engine
This is Rietveld 408576698