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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2675713002: Switch Speech Recognition to asynchronous callback-based AudioManager interactions. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index a30bab3f8b97aaa0964962e89be0c9e87de39896..a1c26ae93df59d6e9de02a4e89ef1a5fc326b82e 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -92,6 +92,7 @@
#include "content/public/common/result_codes.h"
#include "device/battery/battery_status_service.h"
#include "device/gamepad/gamepad_service.h"
+#include "media/audio/audio_system_impl.h"
#include "media/base/media.h"
#include "media/base/user_input_monitor.h"
#include "media/midi/midi_service.h"
@@ -1538,8 +1539,8 @@ int BrowserMainLoop::BrowserThreadsStarted() {
{
TRACE_EVENT0("startup",
"BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition");
- speech_recognition_manager_.reset(
- new SpeechRecognitionManagerImpl(media_stream_manager_.get()));
+ speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl(
+ audio_system_.get(), media_stream_manager_.get()));
}
{
@@ -1798,6 +1799,9 @@ void BrowserMainLoop::CreateAudioManager() {
MediaInternals::GetInstance());
}
CHECK(audio_manager_);
+
+ audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
+ CHECK(audio_system_);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698