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

Unified Diff: content/renderer/speech_recognition_dispatcher.cc

Issue 10933018: Speech JavaScript API: Use the MediaStreamManager to ask for user permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits from xians Created 8 years, 3 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
« no previous file with comments | « content/public/common/speech_recognition_error.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
- // 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:
« no previous file with comments | « content/public/common/speech_recognition_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698