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

Unified Diff: chrome/renderer/speech_input_dispatcher.cc

Issue 4119004: Add ability to parse multiple recognition results and send them to WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move header to chrome/common and address review comments. Created 10 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 | « chrome/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: chrome/renderer/speech_input_dispatcher.cc
diff --git a/chrome/renderer/speech_input_dispatcher.cc b/chrome/renderer/speech_input_dispatcher.cc
index 41b850a95544d126b99c488ec0e6bcd0e224c7fe..dc4e1ff5139c351cd5b6e2c2fde7352828226151 100644
--- a/chrome/renderer/speech_input_dispatcher.cc
+++ b/chrome/renderer/speech_input_dispatcher.cc
@@ -66,9 +66,11 @@ void SpeechInputDispatcher::stopRecording(int request_id) {
}
void SpeechInputDispatcher::OnSpeechRecognitionResult(
- int request_id, const string16& result) {
+ int request_id, const speech_input::SpeechInputResultArray& result) {
VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult enter";
- WebKit::WebString webkit_result(result);
+ 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);
listener_->setRecognitionResult(request_id, webkit_result);
VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult exit";
}
« no previous file with comments | « chrome/renderer/speech_input_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698