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

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

Issue 10233010: Introducing new data types and IPC messages for scripted JS speech recognition APIs (Speech CL2.0) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to Hans review. Created 8 years, 8 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 4831ecd48c68db33dfd7960a9af6d467a0576541..8fd225a084166ef0f00a0fea5c688f7e9fb493c0 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.cc
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.cc
@@ -100,7 +100,9 @@ void InputTagSpeechDispatcherHost::OnStartRecognition(
SpeechRecognitionSessionConfig config;
config.language = params.language;
- config.grammar = params.grammar;
+ if (!params.grammar.empty())
Satish 2012/04/27 10:04:41 suggest using braces here since the body of the if
Primiano Tucci (use gerrit) 2012/04/27 15:58:44 Done.
+ config.grammars.push_back(
+ content::SpeechRecognitionGrammar(params.grammar));
config.origin_url = params.origin_url;
config.initial_context = context;
config.url_request_context_getter = url_request_context_getter_.get();

Powered by Google App Engine
This is Rietveld 408576698