Index: content/browser/speech/speech_recognition_dispatcher_host.cc |
diff --git a/content/browser/speech/speech_recognition_dispatcher_host.cc b/content/browser/speech/speech_recognition_dispatcher_host.cc |
index c0391ec8f31521dedd3d2601c1a88b49911e259f..6a398f985c7f9f87454e43d61f749de220aba34e 100644 |
--- a/content/browser/speech/speech_recognition_dispatcher_host.cc |
+++ b/content/browser/speech/speech_recognition_dispatcher_host.cc |
@@ -14,11 +14,7 @@ |
#include "content/public/browser/speech_recognition_session_context.h" |
#include "content/public/common/content_switches.h" |
-using content::SpeechRecognitionManager; |
-using content::SpeechRecognitionSessionConfig; |
-using content::SpeechRecognitionSessionContext; |
- |
-namespace speech { |
+namespace content { |
SpeechRecognitionManager* SpeechRecognitionDispatcherHost::manager_for_tests_; |
void SpeechRecognitionDispatcherHost::SetManagerForTests( |
@@ -29,7 +25,7 @@ void SpeechRecognitionDispatcherHost::SetManagerForTests( |
SpeechRecognitionDispatcherHost::SpeechRecognitionDispatcherHost( |
int render_process_id, |
net::URLRequestContextGetter* context_getter, |
- content::SpeechRecognitionPreferences* recognition_preferences) |
+ SpeechRecognitionPreferences* recognition_preferences) |
: render_process_id_(render_process_id), |
context_getter_(context_getter), |
recognition_preferences_(recognition_preferences) { |
@@ -97,7 +93,7 @@ void SpeechRecognitionDispatcherHost::OnStartRequest( |
config.event_listener = this; |
int session_id = manager()->CreateSession(config); |
- DCHECK_NE(session_id, content::SpeechRecognitionManager::kSessionIDInvalid); |
+ DCHECK_NE(session_id, SpeechRecognitionManager::kSessionIDInvalid); |
manager()->StartSession(session_id); |
} |
@@ -109,7 +105,7 @@ void SpeechRecognitionDispatcherHost::OnAbortRequest(int render_view_id, |
// The renderer might provide an invalid |request_id| if the session was not |
// started as expected, e.g., due to unsatisfied security requirements. |
- if (session_id != content::SpeechRecognitionManager::kSessionIDInvalid) |
+ if (session_id != SpeechRecognitionManager::kSessionIDInvalid) |
manager()->AbortSession(session_id); |
} |
@@ -121,7 +117,7 @@ void SpeechRecognitionDispatcherHost::OnStopCaptureRequest( |
// The renderer might provide an invalid |request_id| if the session was not |
// started as expected, e.g., due to unsatisfied security requirements. |
- if (session_id != content::SpeechRecognitionManager::kSessionIDInvalid) |
+ if (session_id != SpeechRecognitionManager::kSessionIDInvalid) |
manager()->StopAudioCaptureForSession(session_id); |
} |
@@ -170,7 +166,8 @@ void SpeechRecognitionDispatcherHost::OnRecognitionEnd(int session_id) { |
} |
void SpeechRecognitionDispatcherHost::OnRecognitionResult( |
- int session_id, const content::SpeechRecognitionResult& result) { |
+ int session_id, |
+ const SpeechRecognitionResult& result) { |
const SpeechRecognitionSessionContext& context = |
manager()->GetSessionContext(session_id); |
Send(new SpeechRecognitionMsg_ResultRetrieved(context.render_view_id, |
@@ -179,7 +176,8 @@ void SpeechRecognitionDispatcherHost::OnRecognitionResult( |
} |
void SpeechRecognitionDispatcherHost::OnRecognitionError( |
- int session_id, const content::SpeechRecognitionError& error) { |
+ int session_id, |
+ const SpeechRecognitionError& error) { |
const SpeechRecognitionSessionContext& context = |
manager()->GetSessionContext(session_id); |
Send(new SpeechRecognitionMsg_ErrorOccurred(context.render_view_id, |
@@ -188,9 +186,13 @@ void SpeechRecognitionDispatcherHost::OnRecognitionError( |
} |
// The events below are currently not used by speech JS APIs implementation. |
-void SpeechRecognitionDispatcherHost::OnAudioLevelsChange( |
- int session_id, float volume, float noise_volume) {} |
+void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, |
+ float volume, |
+ float noise_volume) { |
+} |
+ |
void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( |
- int session_id) {} |
+ int session_id) { |
+} |
-} // namespace speech |
+} // namespace content |