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

Unified Diff: chrome/gpu/gpu_channel.h

Issue 6189008: GPU service respects --single-process (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « chrome/browser/gpu_process_host.cc ('k') | chrome/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_channel.h
===================================================================
--- chrome/gpu/gpu_channel.h (revision 71128)
+++ chrome/gpu/gpu_channel.h (working copy)
@@ -24,17 +24,23 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_sync_channel.h"
+class GpuThread;
+
// Encapsulates an IPC channel between the GPU process and one renderer
// process. On the renderer side there's a corresponding GpuChannelHost.
class GpuChannel : public IPC::Channel::Listener,
public IPC::Message::Sender,
public base::RefCountedThreadSafe<GpuChannel> {
public:
- explicit GpuChannel(int renderer_id);
+ GpuChannel(GpuThread* gpu_thread, int renderer_id);
virtual ~GpuChannel();
bool Init();
+ // Get the GpuThread that owns this channel.
+ GpuThread* gpu_thread() const { return gpu_thread_; }
+
+ // Returns the name of the associated IPC channel.
std::string GetChannelName();
#if defined(OS_POSIX)
@@ -84,6 +90,11 @@
int32 decoder_host_id);
void OnDestroyVideoDecoder(int32 decoder_id);
+ // The lifetime of objects of this class is managed by a GpuThread. The
+ // GpuThreadss destroy all the GpuChannels that they own when they
Ken Russell (switch to Gerrit) 2011/01/12 23:13:56 GpuThreadss -> GpuThreads
+ // are destroyed. So a raw pointer is safe.
+ GpuThread* gpu_thread_;
+
scoped_ptr<IPC::SyncChannel> channel_;
// Handle to the renderer process who is on the other side of the channel.
« no previous file with comments | « chrome/browser/gpu_process_host.cc ('k') | chrome/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698