| 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_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // If we failed to prepare the sync socket for the renderer then we fail | 151 // If we failed to prepare the sync socket for the renderer then we fail |
| 152 // the construction of audio input stream. | 152 // the construction of audio input stream. |
| 153 if (!writer->PrepareForeignSocketHandle(peer_handle(), | 153 if (!writer->PrepareForeignSocketHandle(peer_handle(), |
| 154 &foreign_socket_handle)) { | 154 &foreign_socket_handle)) { |
| 155 DeleteEntryOnError(entry); | 155 DeleteEntryOnError(entry); |
| 156 return; | 156 return; |
| 157 } | 157 } |
| 158 | 158 |
| 159 Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id, | 159 Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id, |
| 160 foreign_memory_handle, foreign_socket_handle, | 160 foreign_memory_handle, foreign_socket_handle, |
| 161 entry->shared_memory.created_size(), | 161 entry->shared_memory.requested_size(), |
| 162 entry->shared_memory_segment_count)); | 162 entry->shared_memory_segment_count)); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void AudioInputRendererHost::DoSendRecordingMessage( | 165 void AudioInputRendererHost::DoSendRecordingMessage( |
| 166 media::AudioInputController* controller) { | 166 media::AudioInputController* controller) { |
| 167 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 167 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 168 // TODO(henrika): See crbug.com/115262 for details on why this method | 168 // TODO(henrika): See crbug.com/115262 for details on why this method |
| 169 // should be implemented. | 169 // should be implemented. |
| 170 } | 170 } |
| 171 | 171 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 for (SessionEntryMap::iterator it = session_entries_.begin(); | 468 for (SessionEntryMap::iterator it = session_entries_.begin(); |
| 469 it != session_entries_.end(); ++it) { | 469 it != session_entries_.end(); ++it) { |
| 470 if (stream_id == it->second) { | 470 if (stream_id == it->second) { |
| 471 return it->first; | 471 return it->first; |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 return 0; | 474 return 0; |
| 475 } | 475 } |
| 476 | 476 |
| 477 } // namespace content | 477 } // namespace content |
| OLD | NEW |