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

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

Issue 10629003: Adding support for the SpeechRecognition.maxAlternatives JS API parameter (Speech CL2.5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits + rebase Created 8 years, 6 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/speech/input_tag_speech_dispatcher_host.cc
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.cc b/content/browser/speech/input_tag_speech_dispatcher_host.cc
index b296a99e318518db2ed1948d210a5fd55c176883..fa8d405621237df88f738fbc1942acefd2307bae 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.cc
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.cc
@@ -16,6 +16,10 @@ using content::SpeechRecognitionManager;
using content::SpeechRecognitionSessionConfig;
using content::SpeechRecognitionSessionContext;
+namespace {
+const uint32 kMaxHypothesesForSpeechInputTag = 6;
+}
+
namespace speech {
SpeechRecognitionManager* InputTagSpeechDispatcherHost::manager_for_tests_;
@@ -77,6 +81,7 @@ void InputTagSpeechDispatcherHost::OnStartRecognition(
config.grammars.push_back(
content::SpeechRecognitionGrammar(params.grammar));
}
+ config.max_hypotheses = kMaxHypothesesForSpeechInputTag;
config.origin_url = params.origin_url;
config.initial_context = context;
config.url_request_context_getter = url_request_context_getter_.get();
« no previous file with comments | « content/browser/speech/google_streaming_remote_engine.cc ('k') | content/browser/speech/speech_recognition_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698