Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Side by Side Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 12537014: Make SharedMemory track the size that was actually mapped (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // If we failed to prepare the sync socket for the renderer then we fail 152 // If we failed to prepare the sync socket for the renderer then we fail
153 // the construction of audio input stream. 153 // the construction of audio input stream.
154 if (!writer->PrepareForeignSocketHandle(peer_handle(), 154 if (!writer->PrepareForeignSocketHandle(peer_handle(),
155 &foreign_socket_handle)) { 155 &foreign_socket_handle)) {
156 DeleteEntryOnError(entry); 156 DeleteEntryOnError(entry);
157 return; 157 return;
158 } 158 }
159 159
160 Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id, 160 Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id,
161 foreign_memory_handle, foreign_socket_handle, 161 foreign_memory_handle, foreign_socket_handle,
162 entry->shared_memory.created_size(), 162 entry->shared_memory.requested_size(),
163 entry->shared_memory_segment_count)); 163 entry->shared_memory_segment_count));
164 } 164 }
165 165
166 void AudioInputRendererHost::DoSendRecordingMessage( 166 void AudioInputRendererHost::DoSendRecordingMessage(
167 media::AudioInputController* controller) { 167 media::AudioInputController* controller) {
168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
169 // TODO(henrika): See crbug.com/115262 for details on why this method 169 // TODO(henrika): See crbug.com/115262 for details on why this method
170 // should be implemented. 170 // should be implemented.
171 } 171 }
172 172
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // TODO(hclam): Implement a faster look up method. 404 // TODO(hclam): Implement a faster look up method.
405 for (AudioEntryMap::iterator i = audio_entries_.begin(); 405 for (AudioEntryMap::iterator i = audio_entries_.begin();
406 i != audio_entries_.end(); ++i) { 406 i != audio_entries_.end(); ++i) {
407 if (controller == i->second->controller.get()) 407 if (controller == i->second->controller.get())
408 return i->second; 408 return i->second;
409 } 409 }
410 return NULL; 410 return NULL;
411 } 411 }
412 412
413 } // namespace content 413 } // namespace content
OLDNEW
« no previous file with comments | « base/shared_memory_win.cc ('k') | content/browser/renderer_host/media/audio_input_sync_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698