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

Unified Diff: components/arc/arc_bridge_service_impl.h

Issue 1475583002: Add IPC messages for ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 1 month 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: components/arc/arc_bridge_service_impl.h
diff --git a/components/arc/arc_bridge_service_impl.h b/components/arc/arc_bridge_service_impl.h
index d65e712c538697db9b284f0f32764f819802962c..4ebfc754de891282c8c72410a7829bdda50253cd 100644
--- a/components/arc/arc_bridge_service_impl.h
+++ b/components/arc/arc_bridge_service_impl.h
@@ -38,6 +38,9 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
const std::string& device_type,
base::ScopedFD fd) override;
+ bool SendNotificationEventToAndroid(const std::string& key,
+ ArcNotificationEvent event) override;
+
private:
friend class ArcBridgeTest;
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
@@ -57,6 +60,9 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
const base::FilePath& socket_path,
bool directory_present);
+ // Checks if the IPC channel is ready to send messages to Android.
+ bool SendMessageIfReady(IPC::Message* message);
+
// Internal connection method. Separated to make testing easier.
bool Connect(const IPC::ChannelHandle& handle, IPC::Channel::Mode mode);
@@ -69,6 +75,10 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
// Called when the instance has reached a boot phase
void OnInstanceBootPhase(InstanceBootPhase phase);
+ // Handler for ArcInstanceHostMsg_NotificationPosted message.
+ void OnNotificationPostedFromAndroid(const ArcNotificationData& data);
+ // Handler for ArcInstanceHostMsg_NotificationRemoved message.
+ void OnNotificationRemovedFromAndroid(const std::string& key);
// IPC::Listener:
bool OnMessageReceived(const IPC::Message& message) override;

Powered by Google App Engine
This is Rietveld 408576698