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

Unified Diff: content/browser/speech/speech_input_dispatcher_host.cc

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address comments from Avi 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/speech/speech_input_dispatcher_host.cc
===================================================================
--- content/browser/speech/speech_input_dispatcher_host.cc (revision 113173)
+++ content/browser/speech/speech_input_dispatcher_host.cc (working copy)
@@ -114,11 +114,13 @@
SpeechInputDispatcherHost::SpeechInputDispatcherHost(
int render_process_id,
net::URLRequestContextGetter* context_getter,
- SpeechInputPreferences* speech_input_preferences)
+ SpeechInputPreferences* speech_input_preferences,
+ AudioManager* audio_manager)
: render_process_id_(render_process_id),
may_have_pending_requests_(false),
context_getter_(context_getter),
- speech_input_preferences_(speech_input_preferences) {
+ speech_input_preferences_(speech_input_preferences),
+ audio_manager_(audio_manager) {
// This is initialized by Browser. Do not add any non-trivial
// initialization here, instead do it lazily when required (e.g. see the
// method |manager()|) or add an Init() method.
@@ -160,16 +162,18 @@
}
void SpeechInputDispatcherHost::OnStartRecognition(
- const SpeechInputHostMsg_StartRecognition_Params &params) {
+ const SpeechInputHostMsg_StartRecognition_Params& params) {
int caller_id = g_speech_input_callers.Get().CreateId(
render_process_id_, params.render_view_id, params.request_id);
+
manager()->StartRecognition(this, caller_id,
render_process_id_,
params.render_view_id, params.element_rect,
params.language, params.grammar,
params.origin_url,
context_getter_.get(),
- speech_input_preferences_.get());
+ speech_input_preferences_.get(),
+ audio_manager_.get());
}
void SpeechInputDispatcherHost::OnCancelRecognition(int render_view_id,

Powered by Google App Engine
This is Rietveld 408576698