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

Unified Diff: ipc/ipc_channel_proxy.cc

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_proxy.h ('k') | ipc/ipc_message_pipe_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index f99274f1555f422e13138a3c6ca4648cec434fd5..8a7bdaa6ccdbc91f256f78f4de9552f6d41fbb58 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -429,6 +429,13 @@ void ChannelProxy::Context::GetRemoteAssociatedInterface(
name, std::move(handle));
}
+// Called on the IPC::Channel thread
+void ChannelProxy::Context::SendEventToSignal(
+ mojo::common::mojom::EventPtr event) {
+ if (channel_)
+ channel_->SendEventToSignal(std::move(event));
+}
+
//-----------------------------------------------------------------------------
// static
@@ -584,6 +591,15 @@ void ChannelProxy::RemoveFilter(MessageFilter* filter) {
base::RetainedRef(filter)));
}
+mojo::common::mojom::EventRequest ChannelProxy::CreateSynchronizationEvent() {
+ mojo::common::mojom::EventPtr event;
+ mojo::common::mojom::EventRequest request = mojo::GetProxy(&event);
+ context_->ipc_task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&Context::SendEventToSignal, context_, base::Passed(&event)));
+ return request;
+}
+
void ChannelProxy::AddGenericAssociatedInterface(
const std::string& name,
const GenericAssociatedInterfaceFactory& factory) {
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_message_pipe_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698