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

Unified Diff: ui/arc/notification/arc_notification_delegate.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/arc/notification/arc_notification_delegate.h ('k') | ui/arc/notification/arc_notification_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_notification_delegate.cc
diff --git a/ui/arc/notification/arc_notification_delegate.cc b/ui/arc/notification/arc_notification_delegate.cc
index f71db1ef25d0dda8a2355b8ed85dce74576a82d2..488eb99d86fb92b3033abe29e1fc854c6a70fa8b 100644
--- a/ui/arc/notification/arc_notification_delegate.cc
+++ b/ui/arc/notification/arc_notification_delegate.cc
@@ -6,6 +6,10 @@
#include "ui/arc/notification/arc_custom_notification_view.h"
#include "ui/arc/notification/arc_notification_item.h"
+#include "ui/arc/notification/arc_notification_view.h"
+#include "ui/message_center/notification.h"
+#include "ui/message_center/views/message_center_controller.h"
+#include "ui/message_center/views/message_view.h"
namespace arc {
@@ -15,15 +19,20 @@ ArcNotificationDelegate::ArcNotificationDelegate(
DCHECK(item_);
}
-ArcNotificationDelegate::~ArcNotificationDelegate() {}
+ArcNotificationDelegate::~ArcNotificationDelegate() = default;
-std::unique_ptr<message_center::CustomContent>
-ArcNotificationDelegate::CreateCustomContent() {
+std::unique_ptr<message_center::MessageView>
+ArcNotificationDelegate::CreateCustomMessageView(
+ message_center::MessageCenterController* controller,
+ const message_center::Notification& notification) {
DCHECK(item_);
+ DCHECK_EQ(item_->GetNotificationId(), notification.id());
+
auto view = base::MakeUnique<ArcCustomNotificationView>(item_.get());
auto content_view_delegate = view->CreateContentViewDelegate();
- return base::MakeUnique<message_center::CustomContent>(
- std::move(view), std::move(content_view_delegate));
+ return base::MakeUnique<ArcNotificationView>(std::move(view),
+ std::move(content_view_delegate),
+ controller, notification);
}
void ArcNotificationDelegate::Close(bool by_user) {
« no previous file with comments | « ui/arc/notification/arc_notification_delegate.h ('k') | ui/arc/notification/arc_notification_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698