Chromium Code Reviews| Index: content/renderer/speech_recognition_dispatcher.cc |
| diff --git a/content/renderer/speech_recognition_dispatcher.cc b/content/renderer/speech_recognition_dispatcher.cc |
| index acb3d87f03940fd8ac9efdd0477444248d7a70e6..40390f164b68a7e908cb8f770541ec9a01353955 100644 |
| --- a/content/renderer/speech_recognition_dispatcher.cc |
| +++ b/content/renderer/speech_recognition_dispatcher.cc |
| @@ -59,11 +59,6 @@ void SpeechRecognitionDispatcher::start( |
| DCHECK(!recognizer_client_ || recognizer_client_ == recognizer_client); |
| recognizer_client_ = recognizer_client; |
| - // TODO(primiano): Should return false in order to communicate the failure |
|
Satish
2012/09/12 06:15:09
Is this being removed because a different change a
hans
2012/09/12 09:46:58
Yes, it's handled in WebKit.
|
| - // and let WebKit throw an exception (need a hans@ patch to do that). |
| - if (HandleExists(handle)) |
| - return; |
| - |
| SpeechRecognitionHostMsg_StartRequest_Params msg_params; |
| for (size_t i = 0; i < params.grammars().size(); ++i) { |
| const WebSpeechGrammar& grammar = params.grammars()[i]; |
| @@ -133,6 +128,8 @@ static WebSpeechRecognizerClient::ErrorCode WebKitErrorCode( |
| return WebSpeechRecognizerClient::AudioCaptureError; |
| case content::SPEECH_RECOGNITION_ERROR_NETWORK: |
| return WebSpeechRecognizerClient::NetworkError; |
| + case content::SPEECH_RECOGNITION_ERROR_NOT_ALLOWED: |
| + return WebSpeechRecognizerClient::NotAllowedError; |
| case content::SPEECH_RECOGNITION_ERROR_NO_SPEECH: |
| return WebSpeechRecognizerClient::NoSpeechError; |
| case content::SPEECH_RECOGNITION_ERROR_NO_MATCH: |