| Index: ui/arc/notification/arc_custom_notification_item.h
|
| diff --git a/ui/arc/notification/arc_custom_notification_item.h b/ui/arc/notification/arc_custom_notification_item.h
|
| index 54c35ab0eb32038b1f75ccfb1d7fd36df10faa5e..5bc55b916ef33e2da1ff3195a7cd516f55011288 100644
|
| --- a/ui/arc/notification/arc_custom_notification_item.h
|
| +++ b/ui/arc/notification/arc_custom_notification_item.h
|
| @@ -6,6 +6,7 @@
|
| #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_ITEM_H_
|
|
|
| #include "base/macros.h"
|
| +#include "base/observer_list.h"
|
| #include "ui/arc/notification/arc_notification_item.h"
|
| #include "ui/arc/notification/arc_notification_surface_manager.h"
|
|
|
| @@ -15,6 +16,18 @@ class ArcCustomNotificationItem
|
| : public ArcNotificationItem,
|
| public ArcNotificationSurfaceManager::Observer {
|
| public:
|
| + class Observer {
|
| + public:
|
| + // Invoked when the notification data for this item has changed.
|
| + virtual void OnItemDestroying() = 0;
|
| +
|
| + // Invoked when the pinned stated is changed.
|
| + virtual void OnItemPinnedChanged() = 0;
|
| +
|
| + protected:
|
| + virtual ~Observer() = default;
|
| + };
|
| +
|
| ArcCustomNotificationItem(ArcNotificationManager* manager,
|
| message_center::MessageCenter* message_center,
|
| const std::string& notification_key,
|
| @@ -24,11 +37,21 @@ class ArcCustomNotificationItem
|
| void UpdateWithArcNotificationData(
|
| const mojom::ArcNotificationData& data) override;
|
|
|
| + void CloseFromCloseButton();
|
| +
|
| + void AddObserver(Observer* observer);
|
| + void RemoveObserver(Observer* observer);
|
| +
|
| + bool pinned() const { return pinned_; }
|
| +
|
| private:
|
| // ArcNotificationSurfaceManager::Observer:
|
| void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override;
|
| void OnNotificationSurfaceRemoved(exo::NotificationSurface* surface) override;
|
|
|
| + bool pinned_ = false;
|
| + base::ObserverList<Observer> observers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationItem);
|
| };
|
|
|
|
|