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

Unified Diff: ui/message_center/notification_view.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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/notification_view.cc
diff --git a/ui/message_center/notification_view.cc b/ui/message_center/notification_view.cc
index 11fd6f191cd4602218ac9044747a696426764a39..5a8133bbb92fda179da5996e4f98adba72fb6b2b 100644
--- a/ui/message_center/notification_view.cc
+++ b/ui/message_center/notification_view.cc
@@ -158,6 +158,30 @@ void NotificationButton::SetTitle(string16 title) {
namespace message_center {
+// static
+MessageView* NotificationView::ViewForNotification(
+ const NotificationList::Notification& notification,
+ NotificationList::Delegate* list_delegate) {
+ switch (notification.type) {
+ case ui::notifications::NOTIFICATION_TYPE_BASE_FORMAT:
+ case ui::notifications::NOTIFICATION_TYPE_IMAGE:
+ case ui::notifications::NOTIFICATION_TYPE_MULTIPLE:
+ case ui::notifications::NOTIFICATION_TYPE_SIMPLE:
+ break;
+ default:
+ // If the caller asks for an unrecognized kind of view (entirely possible
+ // if an application is running on an older version of this code that
+ // doesn't have the requested kind of notification template), we'll fall
+ // back to a notification instance that will provide at least basic
+ // functionality.
+ LOG(WARNING) << "Unable to fulfill request for unrecognized "
+ << "notification type " << notification.type << ". "
+ << "Falling back to simple notification type.";
+ }
miket_OOO 2013/01/22 22:39:18 Vertical whitespace after this line would make it
dharcourt 2013/01/23 08:10:12 Done.
+ // Currently all roads lead to the generic NotificationView.
+ return new NotificationView(list_delegate, notification);
+}
+
NotificationView::NotificationView(
NotificationList::Delegate* list_delegate,
const NotificationList::Notification& notification)
« ui/message_center/message_view_factory.cc ('K') | « ui/message_center/notification_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698