| 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 54b194baa293e0ad2a7bdd027675454457683c27..d3cac1be5ba34295277ec51d626380da325f475e 100644
|
| --- a/ui/arc/notification/arc_custom_notification_item.cc
|
| +++ b/ui/arc/notification/arc_custom_notification_item.cc
|
| @@ -25,7 +25,9 @@ constexpr char kNotifierId[] = "ARC_NOTIFICATION";
|
| class ArcNotificationDelegate : public message_center::NotificationDelegate {
|
| public:
|
| explicit ArcNotificationDelegate(ArcCustomNotificationItem* item)
|
| - : item_(item) {}
|
| + : item_(item) {
|
| + DCHECK(item_);
|
| + }
|
|
|
| std::unique_ptr<message_center::CustomContent> CreateCustomContent()
|
| override {
|
| @@ -35,6 +37,8 @@ class ArcNotificationDelegate : public message_center::NotificationDelegate {
|
| std::move(view), std::move(content_view_delegate));
|
| }
|
|
|
| + void Close(bool by_user) override { item_->Close(by_user); }
|
| +
|
| private:
|
| // The destructor is private since this class is ref-counted.
|
| ~ArcNotificationDelegate() override {}
|
| @@ -109,13 +113,6 @@ void ArcCustomNotificationItem::UpdateWithArcNotificationData(
|
| AddToMessageCenter();
|
| }
|
|
|
| -void ArcCustomNotificationItem::CloseFromCloseButton() {
|
| - // Needs to manually remove notification from MessageCenter because
|
| - // the floating close button is not part of MessageCenter.
|
| - message_center()->RemoveNotification(notification_id(), true);
|
| - Close(true);
|
| -}
|
| -
|
| void ArcCustomNotificationItem::AddObserver(Observer* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
|
|