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

Side by Side Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 2283373002: Remove unneeded scoped_refptr<>::get() on method binding (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « extensions/browser/sandboxed_unpacker_unittest.cc ('k') | ipc/ipc_channel_proxy.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 "gpu/ipc/client/gpu_channel_host.h" 5 #include "gpu/ipc/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 void GpuChannelHost::AddRouteWithTaskRunner( 202 void GpuChannelHost::AddRouteWithTaskRunner(
203 int route_id, 203 int route_id,
204 base::WeakPtr<IPC::Listener> listener, 204 base::WeakPtr<IPC::Listener> listener,
205 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 205 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
206 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 206 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
207 factory_->GetIOThreadTaskRunner(); 207 factory_->GetIOThreadTaskRunner();
208 io_task_runner->PostTask( 208 io_task_runner->PostTask(
209 FROM_HERE, 209 FROM_HERE,
210 base::Bind(&GpuChannelHost::MessageFilter::AddRoute, 210 base::Bind(&GpuChannelHost::MessageFilter::AddRoute,
211 channel_filter_.get(), route_id, listener, task_runner)); 211 channel_filter_, route_id, listener, task_runner));
212 } 212 }
213 213
214 void GpuChannelHost::RemoveRoute(int route_id) { 214 void GpuChannelHost::RemoveRoute(int route_id) {
215 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 215 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
216 factory_->GetIOThreadTaskRunner(); 216 factory_->GetIOThreadTaskRunner();
217 io_task_runner->PostTask( 217 io_task_runner->PostTask(
218 FROM_HERE, base::Bind(&GpuChannelHost::MessageFilter::RemoveRoute, 218 FROM_HERE, base::Bind(&GpuChannelHost::MessageFilter::RemoveRoute,
219 channel_filter_.get(), route_id)); 219 channel_filter_, route_id));
220 } 220 }
221 221
222 base::SharedMemoryHandle GpuChannelHost::ShareToGpuProcess( 222 base::SharedMemoryHandle GpuChannelHost::ShareToGpuProcess(
223 base::SharedMemoryHandle source_handle) { 223 base::SharedMemoryHandle source_handle) {
224 if (IsLost()) 224 if (IsLost())
225 return base::SharedMemory::NULLHandle(); 225 return base::SharedMemory::NULLHandle();
226 226
227 return base::SharedMemory::DuplicateHandle(source_handle); 227 return base::SharedMemory::DuplicateHandle(source_handle);
228 } 228 }
229 229
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 listeners_.clear(); 424 listeners_.clear();
425 } 425 }
426 426
427 bool GpuChannelHost::MessageFilter::IsLost() const { 427 bool GpuChannelHost::MessageFilter::IsLost() const {
428 AutoLock lock(lock_); 428 AutoLock lock(lock_);
429 return lost_; 429 return lost_;
430 } 430 }
431 431
432 } // namespace gpu 432 } // namespace gpu
OLDNEW
« no previous file with comments | « extensions/browser/sandboxed_unpacker_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698