Index: ui/arc/notification/arc_notification_item.h |
diff --git a/ui/arc/notification/arc_notification_item.h b/ui/arc/notification/arc_notification_item.h |
index 3825de03e9e257350bca367568fc5d3085e4b104..deb35133e9c02bdc8b72785a0248c25aab9163aa 100644 |
--- a/ui/arc/notification/arc_notification_item.h |
+++ b/ui/arc/notification/arc_notification_item.h |
@@ -13,19 +13,20 @@ |
#include "components/signin/core/account_id/account_id.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/arc/notification/arc_notification_manager.h" |
+#include "ui/arc/notification/arc_notification_surface_collection.h" |
#include "ui/message_center/message_center.h" |
namespace arc { |
// The class represents each ARC notification. One instance of this class |
// corresponds to one ARC notification. |
-class ArcNotificationItem { |
+class ArcNotificationItem : public ArcNotificationSurfaceCollection::Observer { |
yoshiki
2016/06/15 11:47:20
Most of ArcNotificationItem code is not shared wit
xiyuan
2016/06/15 19:32:44
Done.
|
public: |
ArcNotificationItem(ArcNotificationManager* manager, |
message_center::MessageCenter* message_center, |
const std::string& notification_key, |
const AccountId& profile_id); |
- ~ArcNotificationItem(); |
+ ~ArcNotificationItem() override; |
void UpdateWithArcNotificationData(const mojom::ArcNotificationData& data); |
@@ -38,8 +39,15 @@ class ArcNotificationItem { |
void ButtonClick(int button_index); |
private: |
+ // ArcNotificationSurfaceCollection::Observer |
+ void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override; |
+ |
void OnImageDecoded(const SkBitmap& bitmap); |
+ // Add |notification_| to message center and update again if there is |
+ // |newer_data_|. |
+ void AddToMessageCenter(); |
+ |
ArcNotificationManager* const manager_; |
message_center::MessageCenter* const message_center_; |
const AccountId profile_id_; |