OLD | NEW |
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/child_process_host_impl.h" | 5 #include "content/common/child_process_host_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 opening_channel_ = true; | 181 opening_channel_ = true; |
182 | 182 |
183 return channel_id_; | 183 return channel_id_; |
184 } | 184 } |
185 | 185 |
186 bool ChildProcessHostImpl::IsChannelOpening() { | 186 bool ChildProcessHostImpl::IsChannelOpening() { |
187 return opening_channel_; | 187 return opening_channel_; |
188 } | 188 } |
189 | 189 |
190 #if defined(OS_POSIX) | 190 #if defined(OS_POSIX) |
191 int ChildProcessHostImpl::TakeClientFileDescriptor() { | 191 base::ScopedFD ChildProcessHostImpl::TakeClientFileDescriptor() { |
192 return channel_->TakeClientFileDescriptor(); | 192 return channel_->TakeClientFileDescriptor(); |
193 } | 193 } |
194 #endif | 194 #endif |
195 | 195 |
196 bool ChildProcessHostImpl::Send(IPC::Message* message) { | 196 bool ChildProcessHostImpl::Send(IPC::Message* message) { |
197 if (!channel_) { | 197 if (!channel_) { |
198 delete message; | 198 delete message; |
199 return false; | 199 return false; |
200 } | 200 } |
201 return channel_->Send(message); | 201 return channel_->Send(message); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 void ChildProcessHostImpl::GpuMemoryBufferAllocated( | 352 void ChildProcessHostImpl::GpuMemoryBufferAllocated( |
353 IPC::Message* reply, | 353 IPC::Message* reply, |
354 const gfx::GpuMemoryBufferHandle& handle) { | 354 const gfx::GpuMemoryBufferHandle& handle) { |
355 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 355 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
356 handle); | 356 handle); |
357 Send(reply); | 357 Send(reply); |
358 } | 358 } |
359 | 359 |
360 } // namespace content | 360 } // namespace content |
OLD | NEW |