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

Unified Diff: ui/arc/notification/arc_custom_notification_item.cc

Issue 2547433002: Transfer responsibility for providing a close button for a notification to each implementation of M… (Closed)
Patch Set: WrapUnique -> MakeUnique Created 4 years 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 | « no previous file | ui/arc/notification/arc_custom_notification_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_item.cc
diff --git a/ui/arc/notification/arc_custom_notification_item.cc b/ui/arc/notification/arc_custom_notification_item.cc
index 78ecfa468b006f82ae2df72c2ac3229b1eda98ed..827e8cb64b0d3606f361e30a20c9d9d220ec3cf9 100644
--- a/ui/arc/notification/arc_custom_notification_item.cc
+++ b/ui/arc/notification/arc_custom_notification_item.cc
@@ -14,6 +14,7 @@
#include "ui/arc/notification/arc_custom_notification_view.h"
#include "ui/message_center/notification.h"
#include "ui/message_center/notification_types.h"
+#include "ui/message_center/views/custom_notification_content_view_delegate.h"
namespace arc {
@@ -26,8 +27,12 @@ class ArcNotificationDelegate : public message_center::NotificationDelegate {
explicit ArcNotificationDelegate(ArcCustomNotificationItem* item)
: item_(item) {}
- std::unique_ptr<views::View> CreateCustomContent() override {
- return base::MakeUnique<ArcCustomNotificationView>(item_);
+ std::unique_ptr<message_center::CustomContent> CreateCustomContent()
+ override {
+ auto view = base::MakeUnique<ArcCustomNotificationView>(item_);
+ auto content_view_delegate = view->CreateContentViewDelegate();
+ return base::MakeUnique<message_center::CustomContent>(
+ std::move(view), std::move(content_view_delegate));
}
private:
« no previous file with comments | « no previous file | ui/arc/notification/arc_custom_notification_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698