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

Unified Diff: content/renderer/speech_input_dispatcher.cc

Issue 8137005: Applying changes to the existing speech input code to support the extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac bot fix. Created 9 years, 2 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/renderer/speech_input_dispatcher.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_input_dispatcher.cc
diff --git a/content/renderer/speech_input_dispatcher.cc b/content/renderer/speech_input_dispatcher.cc
index 305521dfba01743083b07e7fb45655abefa5d1b3..2cbcd7d93b2bbe7d1b752c1a6f666dbdba65b157 100644
--- a/content/renderer/speech_input_dispatcher.cc
+++ b/content/renderer/speech_input_dispatcher.cc
@@ -84,11 +84,14 @@ void SpeechInputDispatcher::stopRecording(int request_id) {
}
void SpeechInputDispatcher::OnSpeechRecognitionResult(
- int request_id, const speech_input::SpeechInputResultArray& result) {
+ int request_id,
+ const speech_input::SpeechInputResult& result) {
VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult enter";
- WebKit::WebSpeechInputResultArray webkit_result(result.size());
- for (size_t i = 0; i < result.size(); ++i)
- webkit_result[i].set(result[i].utterance, result[i].confidence);
+ WebKit::WebSpeechInputResultArray webkit_result(result.hypotheses.size());
+ for (size_t i = 0; i < result.hypotheses.size(); ++i) {
+ webkit_result[i].set(result.hypotheses[i].utterance,
+ result.hypotheses[i].confidence);
+ }
listener_->setRecognitionResult(request_id, webkit_result);
VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult exit";
}
« no previous file with comments | « content/renderer/speech_input_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698