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

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

Issue 2870283002: Move message_center::CustomNotificationView to arc::ArcNotificationView (Closed)
Patch Set: Fixed test 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
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..66b0b94adeaa893c55485cf8cd0a13821a563d8c 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 {
@@ -17,13 +21,18 @@ ArcNotificationDelegate::ArcNotificationDelegate(
ArcNotificationDelegate::~ArcNotificationDelegate() {}
hidehiko 2017/05/11 14:22:47 nit: s/{}/= default;/
yoshiki 2017/05/12 08:42:37 Done.
-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) {

Powered by Google App Engine
This is Rietveld 408576698