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

Unified Diff: ipc/ipc_message_pipe_reader.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_message_pipe_reader.h ('k') | ipc/ipc_test.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_pipe_reader.cc
diff --git a/ipc/ipc_message_pipe_reader.cc b/ipc/ipc_message_pipe_reader.cc
index a20489bb41107cac098cdcdfc464c590c13c21b8..18a7ce0fde79dd8a62533b514b3d09f363670eed 100644
--- a/ipc/ipc_message_pipe_reader.cc
+++ b/ipc/ipc_message_pipe_reader.cc
@@ -84,6 +84,12 @@ void MessagePipeReader::GetRemoteInterface(
sender_->GetAssociatedInterface(name, std::move(request));
}
+void MessagePipeReader::SendEventToSignal(mojo::common::mojom::EventPtr event) {
+ if (!sender_.is_bound())
+ return;
+ sender_->SignalEvent(std::move(event));
+}
+
void MessagePipeReader::SetPeerPid(int32_t peer_pid) {
peer_pid_ = peer_pid;
delegate_->OnPeerPidReceived();
@@ -121,6 +127,10 @@ void MessagePipeReader::GetAssociatedInterface(
delegate_->OnAssociatedInterfaceRequest(name, request.PassHandle());
}
+void MessagePipeReader::SignalEvent(mojo::common::mojom::EventPtr event) {
+ event->Signal();
+}
+
void MessagePipeReader::OnPipeError(MojoResult error) {
DCHECK(thread_checker_.CalledOnValidThread());
« no previous file with comments | « ipc/ipc_message_pipe_reader.h ('k') | ipc/ipc_test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698