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/process_util.h" | 10 #include "base/process_util.h" |
10 #include "base/shared_memory.h" | |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 AudioInputSyncWriter::AudioInputSyncWriter( | 14 AudioInputSyncWriter::AudioInputSyncWriter( |
15 base::SharedMemory* shared_memory, | 15 base::SharedMemory* shared_memory, |
16 int shared_memory_segment_count) | 16 int shared_memory_segment_count) |
17 : shared_memory_(shared_memory), | 17 : shared_memory_(shared_memory), |
18 shared_memory_segment_count_(shared_memory_segment_count), | 18 shared_memory_segment_count_(shared_memory_segment_count), |
19 current_segment_id_(0) { | 19 current_segment_id_(0) { |
20 DCHECK_GT(shared_memory_segment_count, 0); | 20 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, | 74 base::ProcessHandle process_handle, |
75 base::FileDescriptor* foreign_handle) { | 75 base::FileDescriptor* foreign_handle) { |
76 foreign_handle->fd = foreign_socket_->handle(); | 76 foreign_handle->fd = foreign_socket_->handle(); |
77 foreign_handle->auto_close = false; | 77 foreign_handle->auto_close = false; |
78 return (foreign_handle->fd != -1); | 78 return (foreign_handle->fd != -1); |
79 } | 79 } |
80 | 80 |
81 #endif | 81 #endif |
82 | 82 |
83 } // namespace content | 83 } // namespace content |
OLD | NEW |