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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 9958034: Convert plugin and GPU process to brokered handle duplication. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
===================================================================
--- content/browser/gpu/browser_gpu_channel_host_factory.cc (revision 131361)
+++ content/browser/gpu/browser_gpu_channel_host_factory.cc (working copy)
@@ -153,10 +153,8 @@
void BrowserGpuChannelHostFactory::GpuChannelEstablishedOnIO(
EstablishRequest* request,
const IPC::ChannelHandle& channel_handle,
- base::ProcessHandle gpu_process_handle,
const GPUInfo& gpu_info) {
request->channel_handle = channel_handle;
- request->gpu_process_handle = gpu_process_handle;
request->gpu_info = gpu_info;
request->event.Signal();
}
@@ -191,26 +189,12 @@
request.gpu_process_handle == base::kNullProcessHandle)
return NULL;
- base::ProcessHandle browser_process_for_gpu;
-#if defined(OS_WIN)
- // Create a process handle that the GPU process can use to access our handles.
- DuplicateHandle(base::GetCurrentProcessHandle(),
- base::GetCurrentProcessHandle(),
- request.gpu_process_handle,
- &browser_process_for_gpu,
- PROCESS_DUP_HANDLE,
- FALSE,
- 0);
-#else
- browser_process_for_gpu = base::GetCurrentProcessHandle();
-#endif
-
gpu_channel_ = new GpuChannelHost(this, gpu_host_id_, gpu_client_id_);
gpu_channel_->set_gpu_info(request.gpu_info);
content::GetContentClient()->SetGpuInfo(request.gpu_info);
// Connect to the GPU process if a channel name was received.
- gpu_channel_->Connect(request.channel_handle, browser_process_for_gpu);
+ gpu_channel_->Connect(request.channel_handle);
return gpu_channel_.get();
}

Powered by Google App Engine
This is Rietveld 408576698