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

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

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Then try to initialize the sync writer. 239 // Then try to initialize the sync writer.
240 if (!writer->Init()) { 240 if (!writer->Init()) {
241 SendErrorMessage(stream_id); 241 SendErrorMessage(stream_id);
242 return; 242 return;
243 } 243 }
244 244
245 // If we have successfully created the SyncWriter then assign it to the 245 // If we have successfully created the SyncWriter then assign it to the
246 // entry and construct an AudioInputController. 246 // entry and construct an AudioInputController.
247 entry->writer.reset(writer.release()); 247 entry->writer.reset(writer.release());
248 entry->controller = media::AudioInputController::CreateLowLatency( 248 entry->controller = media::AudioInputController::CreateLowLatency(
249 resource_context_->audio_manager(),
249 this, 250 this,
250 audio_params, 251 audio_params,
251 device_id, 252 device_id,
252 entry->writer.get()); 253 entry->writer.get());
253 254
254 if (!entry->controller) { 255 if (!entry->controller) {
255 SendErrorMessage(stream_id); 256 SendErrorMessage(stream_id);
256 return; 257 return;
257 } 258 }
258 259
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 444 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
444 445
445 for (SessionEntryMap::iterator it = session_entries_.begin(); 446 for (SessionEntryMap::iterator it = session_entries_.begin();
446 it != session_entries_.end(); ++it) { 447 it != session_entries_.end(); ++it) {
447 if (stream_id == it->second) { 448 if (stream_id == it->second) {
448 return it->first; 449 return it->first;
449 } 450 }
450 } 451 }
451 return 0; 452 return 0;
452 } 453 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698