Chromium Code Reviews| 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..e8598a39f48aeb2a9d08866e671b8ef5c036c9f7 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,13 @@ 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::tuple< |
|
yoshiki
2016/12/02 12:15:48
Instead of using a tuple, how about creating new c
xiyuan
2016/12/02 17:45:53
+1 to this, e.g. making struct CustomContent inste
yhanada
2016/12/06 02:48:08
Created |CustomContent| struct for holding the two
|
| + std::unique_ptr<views::View>, |
| + std::unique_ptr<message_center::CustomNotificationContentViewDelegate>> |
| + CreateCustomContent() override { |
| + auto view = base::MakeUnique<ArcCustomNotificationView>(item_); |
| + auto content_view_delegate = view->CreateContentViewDelegate(); |
| + return std::make_tuple(std::move(view), std::move(content_view_delegate)); |
| } |
| private: |