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

Unified Diff: ui/message_center/views/message_view_factory.cc

Issue 2870283002: Move message_center::CustomNotificationView to arc::ArcNotificationView (Closed)
Patch Set: Addressed comment Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_view_factory.cc
diff --git a/ui/message_center/views/message_view_factory.cc b/ui/message_center/views/message_view_factory.cc
index df5f6d923f7e8b9a8b313a6504974aa19d0beeeb..f1c982f4b99c2248a6fa0820d6756aa7256fabfa 100644
--- a/ui/message_center/views/message_view_factory.cc
+++ b/ui/message_center/views/message_view_factory.cc
@@ -5,7 +5,6 @@
#include "ui/message_center/views/message_view_factory.h"
#include "ui/message_center/notification_types.h"
-#include "ui/message_center/views/custom_notification_view.h"
#include "ui/message_center/views/notification_view.h"
#if defined(OS_WIN)
@@ -28,18 +27,23 @@ MessageView* MessageViewFactory::Create(MessageCenterController* controller,
// All above roads lead to the generic NotificationView.
notification_view = new NotificationView(controller, notification);
break;
+#if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
case NOTIFICATION_TYPE_CUSTOM:
- notification_view = new CustomNotificationView(controller, notification);
+ notification_view =
+ notification.delegate()
+ ->CreateCustomMessageView(controller, notification)
+ .release();
break;
+#endif
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.";
+ LOG(WARNING) << "Unable to fulfill request for unrecognized or"
+ << "unsupported notification type " << notification.type()
+ << ". Falling back to simple notification type.";
notification_view = new NotificationView(controller, notification);
}
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698