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

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: Delete debug logs 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
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:
« no previous file with comments | « no previous file | ui/arc/notification/arc_custom_notification_view.h » ('j') | ui/arc/notification/arc_custom_notification_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698