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

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

Issue 11421103: Update the Speech Api to support array(s) of result items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sigh Created 8 years 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/google_one_shot_remote_engine.cc
diff --git a/content/browser/speech/google_one_shot_remote_engine.cc b/content/browser/speech/google_one_shot_remote_engine.cc
index 73e621eb1d2f47b58ef0f9f5eabcdf9d7595b961..113a939692ce351bbc04c9fcf99128a95fdd428e 100644
--- a/content/browser/speech/google_one_shot_remote_engine.cc
+++ b/content/browser/speech/google_one_shot_remote_engine.cc
@@ -262,7 +262,9 @@ void GoogleOneShotRemoteEngine::AudioChunksEnded() {
void GoogleOneShotRemoteEngine::OnURLFetchComplete(
const net::URLFetcher* source) {
DCHECK_EQ(url_fetcher_.get(), source);
- SpeechRecognitionResult result;
+ SpeechRecognitionResults results;
+ results.push_back(SpeechRecognitionResult());
+ SpeechRecognitionResult& result = results.back();
SpeechRecognitionError error(SPEECH_RECOGNITION_ERROR_NETWORK);
std::string data;
@@ -278,7 +280,7 @@ void GoogleOneShotRemoteEngine::OnURLFetchComplete(
delegate()->OnSpeechRecognitionEngineError(error);
} else {
DVLOG(1) << "GoogleOneShotRemoteEngine: Invoking delegate with result.";
- delegate()->OnSpeechRecognitionEngineResult(result);
+ delegate()->OnSpeechRecognitionEngineResults(results);
}
}

Powered by Google App Engine
This is Rietveld 408576698