| Index: content/browser/speech/google_streaming_remote_engine.cc
|
| ===================================================================
|
| --- content/browser/speech/google_streaming_remote_engine.cc (revision 170700)
|
| +++ content/browser/speech/google_streaming_remote_engine.cc (working copy)
|
| @@ -436,11 +436,9 @@
|
| }
|
| }
|
|
|
| - SpeechRecognitionResults results;
|
| for (int i = 0; i < ws_event.result_size(); ++i) {
|
| const proto::SpeechRecognitionResult& ws_result = ws_event.result(i);
|
| - results.push_back(SpeechRecognitionResult());
|
| - SpeechRecognitionResult& result = results.back();
|
| + SpeechRecognitionResult result;
|
| result.is_provisional = !(ws_result.has_final() && ws_result.final());
|
|
|
| if (!result.is_provisional)
|
| @@ -461,10 +459,10 @@
|
|
|
| result.hypotheses.push_back(hypothesis);
|
| }
|
| +
|
| + delegate()->OnSpeechRecognitionEngineResult(result);
|
| }
|
|
|
| - delegate()->OnSpeechRecognitionEngineResults(results);
|
| -
|
| return state_;
|
| }
|
|
|
| @@ -474,7 +472,7 @@
|
| if (!got_last_definitive_result_) {
|
| // Provide an empty result to notify that recognition is ended with no
|
| // errors, yet neither any further results.
|
| - delegate()->OnSpeechRecognitionEngineResults(SpeechRecognitionResults());
|
| + delegate()->OnSpeechRecognitionEngineResult(SpeechRecognitionResult());
|
| }
|
| return AbortSilently(event_args);
|
| }
|
|
|