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

Unified Diff: content/public/common/speech_recognition_result.h

Issue 9663066: Refactoring of chrome speech recognition architecture (CL1.3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to (partial) Satish review. Created 8 years, 9 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/public/common/speech_recognition_result.h
diff --git a/content/public/common/speech_recognition_result.h b/content/public/common/speech_recognition_result.h
index e5efe5ba9a6362305ec38727aa80a3e752b40d51..d7007631d423d8caa8361878f181adbda9c591e1 100644
--- a/content/public/common/speech_recognition_result.h
+++ b/content/public/common/speech_recognition_result.h
@@ -48,8 +48,24 @@ enum SpeechRecognitionErrorCode {
SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR,
};
+// Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error.
+enum SpeechAudioErrorDetails {
+ AUDIO_ERROR_UNKNOWN = 0,
+ AUDIO_ERROR_NO_MIC,
+ AUDIO_ERROR_MIC_IN_USE
+};
+
+struct CONTENT_EXPORT SpeechRecognitionError {
+ SpeechRecognitionErrorCode code;
+ int details;
Satish 2012/03/21 13:29:48 I see the above enum is being passed via this memb
Primiano Tucci (use gerrit) 2012/03/22 11:20:41 The problem is that details is a specialization of
+
+ SpeechRecognitionError();
+ SpeechRecognitionError(SpeechRecognitionErrorCode code_value);
+ SpeechRecognitionError(SpeechRecognitionErrorCode code_val, int details_val);
+};
+
struct CONTENT_EXPORT SpeechRecognitionResult {
- SpeechRecognitionErrorCode error;
+ SpeechRecognitionErrorCode error; // TODO(primiano) This is transitional.
SpeechRecognitionHypothesisArray hypotheses;
SpeechRecognitionResult();

Powered by Google App Engine
This is Rietveld 408576698