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

Unified Diff: ipc/ipc_message_pipe_reader.cc

Issue 2137353002: Adds associated interface support to IPC::Channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@channel-bindings-1
Patch Set: . Created 4 years, 5 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_mojo_bootstrap.h » ('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 da2d85d981abfe184f99d31ca264d9239656e4fe..74c72858fcd179b8389583a85619b3eccb7dab19 100644
--- a/ipc/ipc_message_pipe_reader.cc
+++ b/ipc/ipc_message_pipe_reader.cc
@@ -115,6 +115,14 @@ bool MessagePipeReader::Send(std::unique_ptr<Message> message) {
return result == MOJO_RESULT_OK;
}
+void MessagePipeReader::GetRemoteInterface(
+ const std::string& name,
+ mojo::ScopedInterfaceEndpointHandle handle) {
+ mojom::GenericInterfaceAssociatedRequest request;
+ request.Bind(std::move(handle));
+ sender_->GetAssociatedInterface(name, std::move(request));
+}
+
void MessagePipeReader::Receive(
mojo::Array<uint8_t> data,
mojo::Array<mojom::SerializedHandlePtr> handles) {
@@ -138,6 +146,14 @@ void MessagePipeReader::Receive(
delegate_->OnMessageReceived(message);
}
+void MessagePipeReader::GetAssociatedInterface(
+ const mojo::String& name,
+ mojom::GenericInterfaceAssociatedRequest request) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (delegate_)
+ delegate_->OnAssociatedInterfaceRequest(name, request.PassHandle());
+}
+
void MessagePipeReader::OnPipeError(MojoResult error) {
DCHECK(thread_checker_.CalledOnValidThread());
if (delegate_)
« no previous file with comments | « ipc/ipc_message_pipe_reader.h ('k') | ipc/ipc_mojo_bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698