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

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

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: more rebase Created 4 years, 5 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_manager.h
diff --git a/ui/arc/notification/arc_notification_manager.h b/ui/arc/notification/arc_notification_manager.h
index f75b8286b7e1a07f6f585a8547e595394e29a3e1..2e37a3b5f9f72bb8bf6c9bf096bda31658f60ef7 100644
--- a/ui/arc/notification/arc_notification_manager.h
+++ b/ui/arc/notification/arc_notification_manager.h
@@ -11,6 +11,7 @@
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service.h"
#include "components/arc/common/notifications.mojom.h"
+#include "components/arc/instance_holder.h"
#include "components/signin/core/account_id/account_id.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "ui/message_center/message_center.h"
@@ -19,9 +20,10 @@ namespace arc {
class ArcNotificationItem;
-class ArcNotificationManager : public ArcService,
- public ArcBridgeService::Observer,
- public mojom::NotificationsHost {
+class ArcNotificationManager
+ : public ArcService,
+ public InstanceHolder<mojom::NotificationsInstance>::Observer,
+ public mojom::NotificationsHost {
public:
ArcNotificationManager(ArcBridgeService* bridge_service,
const AccountId& main_profile_id);
@@ -32,9 +34,10 @@ class ArcNotificationManager : public ArcService,
~ArcNotificationManager() override;
- // ArcBridgeService::Observer implementation:
- void OnNotificationsInstanceReady() override;
- void OnNotificationsInstanceClosed() override;
+ // InstanceHolder<mojom::NotificationsInstance>::Observer implementation:
+ void OnInstanceReady(mojom::NotificationsInstance* notifications_instance,
+ uint32_t version) override;
+ void OnInstanceClosed(mojom::NotificationsInstance*) override;
// mojom::NotificationsHost implementation:
void OnNotificationPosted(mojom::ArcNotificationDataPtr data) override;
@@ -45,8 +48,8 @@ class ArcNotificationManager : public ArcService,
// Methods called from ArcNotificationItem:
void SendNotificationRemovedFromChrome(const std::string& key);
void SendNotificationClickedOnChrome(const std::string& key);
- void SendNotificationButtonClickedOnChrome(
- const std::string& key, int button_index);
+ void SendNotificationButtonClickedOnChrome(const std::string& key,
+ int button_index);
private:
const AccountId main_profile_id_;

Powered by Google App Engine
This is Rietveld 408576698