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

Unified Diff: ipc/ipc_channel_proxy.h

Issue 2455823002: Support generic synchronization against an IPC::Channel (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.h
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index c90a4c639ba8352836658d93c64c275c177b915d..8b1d3089c7c8871987d6d657a69e4f744ae785b8 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -22,6 +22,7 @@
#include "ipc/ipc_endpoint.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
+#include "mojo/common/event.mojom.h"
#include "mojo/public/cpp/bindings/associated_group.h"
#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
@@ -160,6 +161,11 @@ class IPC_EXPORT ChannelProxy : public Endpoint, public base::NonThreadSafe {
void AddFilter(MessageFilter* filter);
void RemoveFilter(MessageFilter* filter);
+ // Sends a message to the remote endpoint and returns an Event pipe which will
+ // Signal() once as soon as the remote endpoint receives the message. This
+ // can be used to synchronize against the Channel's message FIFO.
+ mojo::common::mojom::EventRequest CreateSynchronizationEvent();
+
using GenericAssociatedInterfaceFactory =
base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>;
@@ -274,6 +280,9 @@ class IPC_EXPORT ChannelProxy : public Endpoint, public base::NonThreadSafe {
const std::string& name,
mojo::ScopedInterfaceEndpointHandle handle);
+ // Sends an Event to be signaled by the remote end.
+ void SendEventToSignal(mojo::common::mojom::EventPtr event);
+
protected:
friend class base::RefCountedThreadSafe<Context>;
~Context() override;
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698