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

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

Issue 310293002: Make IPC::Channel polymorphic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt to fix build breakage 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/npapi/np_channel_base.h ('k') | content/common/gpu/gpu_channel.h » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 base::SharedMemoryHandle GpuChannelHost::ShareToGpuProcess( 260 base::SharedMemoryHandle GpuChannelHost::ShareToGpuProcess(
261 base::SharedMemoryHandle source_handle) { 261 base::SharedMemoryHandle source_handle) {
262 if (IsLost()) 262 if (IsLost())
263 return base::SharedMemory::NULLHandle(); 263 return base::SharedMemory::NULLHandle();
264 264
265 #if defined(OS_WIN) 265 #if defined(OS_WIN)
266 // Windows needs to explicitly duplicate the handle out to another process. 266 // Windows needs to explicitly duplicate the handle out to another process.
267 base::SharedMemoryHandle target_handle; 267 base::SharedMemoryHandle target_handle;
268 if (!BrokerDuplicateHandle(source_handle, 268 if (!BrokerDuplicateHandle(source_handle,
269 channel_->peer_pid(), 269 channel_->GetPeerPID(),
270 &target_handle, 270 &target_handle,
271 FILE_GENERIC_READ | FILE_GENERIC_WRITE, 271 FILE_GENERIC_READ | FILE_GENERIC_WRITE,
272 0)) { 272 0)) {
273 return base::SharedMemory::NULLHandle(); 273 return base::SharedMemory::NULLHandle();
274 } 274 }
275 275
276 return target_handle; 276 return target_handle;
277 #else 277 #else
278 int duped_handle = HANDLE_EINTR(dup(source_handle.fd)); 278 int duped_handle = HANDLE_EINTR(dup(source_handle.fd));
279 if (duped_handle < 0) 279 if (duped_handle < 0)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 listeners_.clear(); 391 listeners_.clear();
392 } 392 }
393 393
394 bool GpuChannelHost::MessageFilter::IsLost() const { 394 bool GpuChannelHost::MessageFilter::IsLost() const {
395 AutoLock lock(lock_); 395 AutoLock lock(lock_);
396 return lost_; 396 return lost_;
397 } 397 }
398 398
399 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/np_channel_base.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698