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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 return NULL; 244 return NULL;
245 245
246 GpuProcessHost *host = g_hosts_by_id.Pointer()->Lookup(host_id); 246 GpuProcessHost *host = g_hosts_by_id.Pointer()->Lookup(host_id);
247 if (HostIsValid(host_id, host)) 247 if (HostIsValid(host_id, host))
248 return host; 248 return host;
249 249
250 return NULL; 250 return NULL;
251 } 251 }
252 252
253 GpuProcessHost::GpuProcessHost(int host_id) 253 GpuProcessHost::GpuProcessHost(int host_id)
254 : BrowserChildProcessHost(GPU_PROCESS), 254 : BrowserChildProcessHost(content::PROCESS_TYPE_GPU),
255 host_id_(host_id), 255 host_id_(host_id),
256 gpu_process_(base::kNullProcessHandle), 256 gpu_process_(base::kNullProcessHandle),
257 in_process_(false), 257 in_process_(false),
258 software_rendering_(false) { 258 software_rendering_(false) {
259 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) || 259 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
260 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)) 260 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))
261 in_process_ = true; 261 in_process_ = true;
262 262
263 // If the 'single GPU process' policy ever changes, we still want to maintain 263 // If the 'single GPU process' policy ever changes, we still want to maintain
264 // it for 'gpu thread' mode and only create one instance of host and thread. 264 // it for 'gpu thread' mode and only create one instance of host and thread.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 scoped_ptr<EstablishChannelCallback> wrapped_callback(callback); 647 scoped_ptr<EstablishChannelCallback> wrapped_callback(callback);
648 wrapped_callback->Run(channel_handle, renderer_process_for_gpu, gpu_info); 648 wrapped_callback->Run(channel_handle, renderer_process_for_gpu, gpu_info);
649 } 649 }
650 650
651 void GpuProcessHost::CreateCommandBufferError( 651 void GpuProcessHost::CreateCommandBufferError(
652 CreateCommandBufferCallback* callback, int32 route_id) { 652 CreateCommandBufferCallback* callback, int32 route_id) {
653 scoped_ptr<GpuProcessHost::CreateCommandBufferCallback> 653 scoped_ptr<GpuProcessHost::CreateCommandBufferCallback>
654 wrapped_callback(callback); 654 wrapped_callback(callback);
655 callback->Run(route_id); 655 callback->Run(route_id);
656 } 656 }
OLDNEW
« no previous file with comments | « content/browser/debugger/worker_devtools_manager.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698