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

Unified Diff: ui/arc/notification/arc_notification_item.h

Issue 2066853002: arc: Show custom notification via notification surface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-exo
Patch Set: clean up Created 4 years, 6 months 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_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_;

Powered by Google App Engine
This is Rietveld 408576698