| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
| 10 | 10 |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 shutdown_event)); | 389 shutdown_event)); |
| 390 | 390 |
| 391 return true; | 391 return true; |
| 392 } | 392 } |
| 393 | 393 |
| 394 std::string GpuChannel::GetChannelName() { | 394 std::string GpuChannel::GetChannelName() { |
| 395 return StringPrintf("%d.r%d.gpu", base::GetCurrentProcId(), renderer_id_); | 395 return StringPrintf("%d.r%d.gpu", base::GetCurrentProcId(), renderer_id_); |
| 396 } | 396 } |
| 397 | 397 |
| 398 #if defined(OS_POSIX) | 398 #if defined(OS_POSIX) |
| 399 int GpuChannel::GetRendererFileDescriptor() { | 399 int GpuChannel::TakeRendererFileDescriptor() { |
| 400 int fd = -1; | 400 if (!channel_.get()) { |
| 401 if (channel_.get()) { | 401 NOTREACHED(); |
| 402 fd = channel_->GetClientFileDescriptor(); | 402 return -1; |
| 403 } | 403 } |
| 404 return fd; | 404 return channel_->TakeClientFileDescriptor(); |
| 405 } | 405 } |
| 406 #endif // defined(OS_POSIX) | 406 #endif // defined(OS_POSIX) |
| OLD | NEW |