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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/child_thread.cc ('k') | content/renderer/gpu/input_event_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 bool GpuChannelHost::CollectRenderingStatsForSurface( 230 bool GpuChannelHost::CollectRenderingStatsForSurface(
231 int surface_id, GpuRenderingStats* stats) { 231 int surface_id, GpuRenderingStats* stats) {
232 TRACE_EVENT0("gpu", "GpuChannelHost::CollectRenderingStats"); 232 TRACE_EVENT0("gpu", "GpuChannelHost::CollectRenderingStats");
233 233
234 return Send(new GpuChannelMsg_CollectRenderingStatsForSurface(surface_id, 234 return Send(new GpuChannelMsg_CollectRenderingStatsForSurface(surface_id,
235 stats)); 235 stats));
236 } 236 }
237 237
238 void GpuChannelHost::AddRoute( 238 void GpuChannelHost::AddRoute(
239 int route_id, base::WeakPtr<IPC::Listener> listener) { 239 int route_id, base::WeakPtr<IPC::Listener> listener) {
240 DCHECK(MessageLoopProxy::current()); 240 DCHECK(MessageLoopProxy::current().get());
241 241
242 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy(); 242 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy();
243 io_loop->PostTask(FROM_HERE, 243 io_loop->PostTask(FROM_HERE,
244 base::Bind(&GpuChannelHost::MessageFilter::AddRoute, 244 base::Bind(&GpuChannelHost::MessageFilter::AddRoute,
245 channel_filter_.get(), route_id, listener, 245 channel_filter_.get(), route_id, listener,
246 MessageLoopProxy::current())); 246 MessageLoopProxy::current()));
247 } 247 }
248 248
249 void GpuChannelHost::RemoveRoute(int route_id) { 249 void GpuChannelHost::RemoveRoute(int route_id) {
250 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy(); 250 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 const GpuListenerInfo& info = it->second; 392 const GpuListenerInfo& info = it->second;
393 info.loop->PostTask( 393 info.loop->PostTask(
394 FROM_HERE, 394 FROM_HERE,
395 base::Bind(&IPC::Listener::OnChannelError, info.listener)); 395 base::Bind(&IPC::Listener::OnChannelError, info.listener));
396 } 396 }
397 397
398 listeners_.clear(); 398 listeners_.clear();
399 } 399 }
400 400
401 } // namespace content 401 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread.cc ('k') | content/renderer/gpu/input_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698