| Index: components/arc/arc_bridge_service.h
|
| diff --git a/components/arc/arc_bridge_service.h b/components/arc/arc_bridge_service.h
|
| index e3417bc985756c0db52044b339df84c9da3d350b..2f962f06f92cf1bb6a4cc3bbf697abbda7ffb516 100644
|
| --- a/components/arc/arc_bridge_service.h
|
| +++ b/components/arc/arc_bridge_service.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/macros.h"
|
| #include "base/observer_list.h"
|
| #include "base/sequenced_task_runner.h"
|
| +#include "components/arc/common/arc_notification_types.h"
|
| #include "ipc/ipc_channel_proxy.h"
|
| #include "ipc/ipc_listener.h"
|
| #include "ipc/ipc_message.h"
|
| @@ -67,6 +68,13 @@ class ArcBridgeService : public IPC::Listener {
|
| // Called whenever ARC's availability has changed for this system.
|
| virtual void OnAvailableChanged(bool available) {}
|
|
|
| + // Called whenever a notification has been posted on Android side. This
|
| + // event is used for both creation and update.
|
| + virtual void OnNotificationPostedFromAndroid(
|
| + const ArcNotificationData& data) {}
|
| + // Called whenever a notification has been removed on Android side.
|
| + virtual void OnNotificationRemovedFromAndroid(const std::string& key) {}
|
| +
|
| protected:
|
| virtual ~Observer() {}
|
| };
|
| @@ -115,6 +123,9 @@ class ArcBridgeService : public IPC::Listener {
|
| const std::string& device_type,
|
| base::ScopedFD fd);
|
|
|
| + // Notifys a notification event to Android side.
|
| + bool NotifyNotificationEvent(const std::string& key, NotificationEvent event);
|
| +
|
| private:
|
| friend class ArcBridgeTest;
|
| FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
|
| @@ -148,6 +159,11 @@ class ArcBridgeService : public IPC::Listener {
|
| // interaction.
|
| void OnInstanceReady();
|
|
|
| + // Handler for ArcInstanceHostMsg_NotificationPosted message.
|
| + void OnNotificationPosted(const ArcNotificationData& data);
|
| + // Handler for ArcInstanceHostMsg_NotificationRemoved message.
|
| + void OnNotificationRemoved(const std::string& key);
|
| +
|
| // Changes the current state and notifies all observers.
|
| void SetState(State state);
|
|
|
|
|