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

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
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
===================================================================
--- content/browser/gpu/browser_gpu_channel_host_factory.cc (revision 132263)
+++ content/browser/gpu/browser_gpu_channel_host_factory.cc (working copy)
@@ -26,8 +26,7 @@
}
BrowserGpuChannelHostFactory::EstablishRequest::EstablishRequest()
- : event(false, false),
- gpu_process_handle(base::kNullProcessHandle) {
+ : event(false, false) {
}
BrowserGpuChannelHostFactory::EstablishRequest::~EstablishRequest() {
@@ -153,10 +152,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();
}
@@ -187,30 +184,15 @@
// TODO(piman): Make this asynchronous.
request.event.Wait();
- if (request.channel_handle.name.empty() ||
- request.gpu_process_handle == base::kNullProcessHandle)
+ if (request.channel_handle.name.empty())
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();
}
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698