diff options
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/render_thread_impl.cc | 7 | ||||
-rw-r--r-- | content/renderer/webplugin_delegate_proxy.cc | 23 |
2 files changed, 9 insertions, 21 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index f565201..a047050 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -909,15 +909,18 @@ GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( // Ask the browser for the channel name. int client_id = 0; IPC::ChannelHandle channel_handle; + base::ProcessHandle renderer_process_for_gpu; content::GPUInfo gpu_info; if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch, &client_id, &channel_handle, + &renderer_process_for_gpu, &gpu_info)) || + channel_handle.name.empty() || #if defined(OS_POSIX) channel_handle.socket.fd == -1 || #endif - channel_handle.name.empty()) { + renderer_process_for_gpu == base::kNullProcessHandle) { // Otherwise cancel the connection. gpu_channel_ = NULL; return NULL; @@ -928,7 +931,7 @@ GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( content::GetContentClient()->SetGpuInfo(gpu_info); // Connect to the GPU process if a channel name was received. - gpu_channel_->Connect(channel_handle); + gpu_channel_->Connect(channel_handle, renderer_process_for_gpu); return GetGpuChannel(); } diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc index b6ff543..5bc6084 100644 --- a/content/renderer/webplugin_delegate_proxy.cc +++ b/content/renderer/webplugin_delegate_proxy.cc @@ -18,7 +18,6 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/process.h" #include "base/string_split.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -61,10 +60,6 @@ #include "base/mac/mac_util.h" #endif -#if defined(OS_WIN) -#include "content/common/sandbox_policy.h" -#endif - using WebKit::WebBindings; using WebKit::WebCursorInfo; using WebKit::WebDragData; @@ -489,8 +484,7 @@ void WebPluginDelegateProxy::OnChannelError() { static void CopyTransportDIBHandleForMessage( const TransportDIB::Handle& handle_in, - TransportDIB::Handle* handle_out, - base::ProcessId peer_pid) { + TransportDIB::Handle* handle_out) { #if defined(OS_MACOSX) // On Mac, TransportDIB::Handle is typedef'ed to FileDescriptor, and // FileDescriptor message fields needs to remain valid until the message is @@ -500,12 +494,6 @@ static void CopyTransportDIBHandleForMessage( return; } handle_out->auto_close = true; -#elif defined(OS_WIN) - // On Windows we need to duplicate the handle for the plugin process. - *handle_out = NULL; - sandbox::BrokerDuplicateHandle(handle_in, peer_pid, handle_out, - FILE_MAP_READ | FILE_MAP_WRITE, 0); - CHECK(*handle_out != NULL); #else // Don't need to do anything special for other platforms. *handle_out = handle_in; @@ -532,18 +520,15 @@ void WebPluginDelegateProxy::SendUpdateGeometry( { if (transport_stores_[0].dib.get()) CopyTransportDIBHandleForMessage(transport_stores_[0].dib->handle(), - ¶m.windowless_buffer0, - channel_host_->peer_pid()); + ¶m.windowless_buffer0); if (transport_stores_[1].dib.get()) CopyTransportDIBHandleForMessage(transport_stores_[1].dib->handle(), - ¶m.windowless_buffer1, - channel_host_->peer_pid()); + ¶m.windowless_buffer1); if (background_store_.dib.get()) CopyTransportDIBHandleForMessage(background_store_.dib->handle(), - ¶m.background_buffer, - channel_host_->peer_pid()); + ¶m.background_buffer); } IPC::Message* msg; |