| 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/browser/renderer_host/media/audio_input_sync_writer.h" | 5 #include "content/browser/renderer_host/media/audio_input_sync_writer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/process_util.h" | |
| 11 | 10 |
| 12 namespace content { | 11 namespace content { |
| 13 | 12 |
| 14 AudioInputSyncWriter::AudioInputSyncWriter( | 13 AudioInputSyncWriter::AudioInputSyncWriter( |
| 15 base::SharedMemory* shared_memory, | 14 base::SharedMemory* shared_memory, |
| 16 int shared_memory_segment_count) | 15 int shared_memory_segment_count) |
| 17 : shared_memory_(shared_memory), | 16 : shared_memory_(shared_memory), |
| 18 shared_memory_segment_count_(shared_memory_segment_count), | 17 shared_memory_segment_count_(shared_memory_segment_count), |
| 19 current_segment_id_(0) { | 18 current_segment_id_(0) { |
| 20 DCHECK_GT(shared_memory_segment_count, 0); | 19 DCHECK_GT(shared_memory_segment_count, 0); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 base::ProcessHandle process_handle, | 73 base::ProcessHandle process_handle, |
| 75 base::FileDescriptor* foreign_handle) { | 74 base::FileDescriptor* foreign_handle) { |
| 76 foreign_handle->fd = foreign_socket_->handle(); | 75 foreign_handle->fd = foreign_socket_->handle(); |
| 77 foreign_handle->auto_close = false; | 76 foreign_handle->auto_close = false; |
| 78 return (foreign_handle->fd != -1); | 77 return (foreign_handle->fd != -1); |
| 79 } | 78 } |
| 80 | 79 |
| 81 #endif | 80 #endif |
| 82 | 81 |
| 83 } // namespace content | 82 } // namespace content |
| OLD | NEW |