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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 6262ed5e071c478ebf16be0d95bac09b16e175de..727bb89492b14ae3ecfe9fe0f72b3d368a0a4183 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -77,24 +77,24 @@ class GpuChannelMessageFilter : public IPC::MessageFilter {
scoped_refptr<base::MessageLoopProxy> message_loop)
: preemption_state_(IDLE),
gpu_channel_(gpu_channel),
- channel_(NULL),
+ sender_(NULL),
sync_point_manager_(sync_point_manager),
message_loop_(message_loop),
messages_forwarded_to_channel_(0),
a_stub_is_descheduled_(false) {}
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
- DCHECK(!channel_);
- channel_ = channel;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE {
+ DCHECK(!sender_);
+ sender_ = sender;
}
virtual void OnFilterRemoved() OVERRIDE {
- DCHECK(channel_);
- channel_ = NULL;
+ DCHECK(sender_);
+ sender_ = NULL;
}
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
- DCHECK(channel_);
+ DCHECK(sender_);
bool handled = false;
if (message.type() == GpuCommandBufferMsg_RetireSyncPoint::ID) {
@@ -148,7 +148,7 @@ class GpuChannelMessageFilter : public IPC::MessageFilter {
}
bool Send(IPC::Message* message) {
- return channel_->Send(message);
+ return sender_->Send(message);
}
protected:
@@ -359,7 +359,7 @@ class GpuChannelMessageFilter : public IPC::MessageFilter {
// NOTE: this weak pointer is never dereferenced on the IO thread, it's only
// passed through - therefore the WeakPtr assumptions are respected.
base::WeakPtr<GpuChannel> gpu_channel_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
scoped_refptr<SyncPointManager> sync_point_manager_;
scoped_refptr<base::MessageLoopProxy> message_loop_;
scoped_refptr<gpu::PreemptionFlag> preempting_flag_;
« no previous file with comments | « content/common/font_cache_dispatcher_win.cc ('k') | content/common/gpu/media/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698