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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2038423004: Use ChannelMojo for Browser-GPU and Renderer-GPU IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-utility-channel-mojo
Patch Set: fix pepper Created 4 years, 6 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 | « content/gpu/gpu_child_thread.cc ('k') | content/renderer/pepper/host_dispatcher_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index ea5e4bc341e1bb6fa2524a3f7a1e4f85b2c32f2c..2c9e606b7ef1c5364148503f7a844de6fb41114d 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -39,6 +39,7 @@
#include "ipc/ipc_platform_file.h"
#include "ipc/ipc_sync_channel.h"
#include "ipc/ipc_sync_message_filter.h"
+#include "mojo/public/cpp/system/message_pipe.h"
#include "ppapi/c/dev/ppp_network_state_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppp.h"
@@ -488,11 +489,8 @@ bool PpapiThread::SetupChannel(base::ProcessId renderer_pid,
bool incognito,
IPC::ChannelHandle* handle) {
DCHECK(is_broker_ == (connect_instance_func_ != NULL));
- IPC::ChannelHandle plugin_handle;
- plugin_handle.name = IPC::Channel::GenerateVerifiedChannelID(
- base::StringPrintf(
- "%d.r%d", base::GetCurrentProcId(), renderer_child_id));
-
+ mojo::MessagePipe message_pipe;
+ IPC::ChannelHandle plugin_handle(message_pipe.handle0.release());
ppapi::proxy::ProxyChannel* dispatcher = NULL;
bool init_result = false;
if (is_broker_) {
@@ -523,15 +521,7 @@ bool PpapiThread::SetupChannel(base::ProcessId renderer_pid,
return false;
}
- handle->name = plugin_handle.name;
-#if defined(OS_POSIX)
- // On POSIX, transfer ownership of the renderer-side (client) FD.
- // This ensures this process will be notified when it is closed even if a
- // connection is not established.
- handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD());
- if (handle->socket.fd == -1)
- return false;
-#endif
+ handle->mojo_handle = message_pipe.handle1.release();
// From here, the dispatcher will manage its own lifetime according to the
// lifetime of the attached channel.
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/renderer/pepper/host_dispatcher_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698