Chromium Code Reviews| 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) { |