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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 opening_channel_ = true; | 171 opening_channel_ = true; |
172 | 172 |
173 return true; | 173 return true; |
174 } | 174 } |
175 | 175 |
176 bool ChildProcessHostImpl::IsChannelOpening() { | 176 bool ChildProcessHostImpl::IsChannelOpening() { |
177 return opening_channel_; | 177 return opening_channel_; |
178 } | 178 } |
179 | 179 |
180 #if defined(OS_POSIX) | |
181 base::ScopedFD ChildProcessHostImpl::TakeClientFileDescriptor() { | |
182 return channel_->TakeClientFileDescriptor(); | |
183 } | |
184 #endif | |
185 | |
186 bool ChildProcessHostImpl::Send(IPC::Message* message) { | 180 bool ChildProcessHostImpl::Send(IPC::Message* message) { |
187 if (!channel_) { | 181 if (!channel_) { |
188 delete message; | 182 delete message; |
189 return false; | 183 return false; |
190 } | 184 } |
191 return channel_->Send(message); | 185 return channel_->Send(message); |
192 } | 186 } |
193 | 187 |
194 void ChildProcessHostImpl::AllocateSharedMemory( | 188 void ChildProcessHostImpl::AllocateSharedMemory( |
195 size_t buffer_size, base::ProcessHandle child_process_handle, | 189 size_t buffer_size, base::ProcessHandle child_process_handle, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 337 } |
344 | 338 |
345 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer( | 339 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer( |
346 gfx::GpuMemoryBufferId id, | 340 gfx::GpuMemoryBufferId id, |
347 const gpu::SyncToken& sync_token) { | 341 const gpu::SyncToken& sync_token) { |
348 // Note: Nothing to do here as ownership of shared memory backed | 342 // Note: Nothing to do here as ownership of shared memory backed |
349 // GpuMemoryBuffers is passed with IPC. | 343 // GpuMemoryBuffers is passed with IPC. |
350 } | 344 } |
351 | 345 |
352 } // namespace content | 346 } // namespace content |
OLD | NEW |