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

Side by Side Diff: content/public/common/speech_recognition_error.h

Issue 617103007: Revert of Revert of Use the new java_cpp_enum rule in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_
6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ 6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_
7 7
8 namespace content { 8 namespace content {
9 9
10 // A Java counterpart will be generated for this enum.
11 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content_public.common
12 // GENERATED_JAVA_PREFIX_TO_STRIP: SPEECH_RECOGNITION_ERROR_
10 enum SpeechRecognitionErrorCode { 13 enum SpeechRecognitionErrorCode {
11 #define DEFINE_SPEECH_RECOGNITION_ERROR(x, y) SPEECH_RECOGNITION_ERROR_##x = y, 14 // There was no error.
12 #include "content/public/common/speech_recognition_error_list.h" 15 SPEECH_RECOGNITION_ERROR_NONE,
13 #undef DEFINE_SPEECH_RECOGNITION_ERROR 16
17 // The user or a script aborted speech input.
18 SPEECH_RECOGNITION_ERROR_ABORTED,
19
20 // There was an error with recording audio.
21 SPEECH_RECOGNITION_ERROR_AUDIO,
22
23 // There was a network error.
24 SPEECH_RECOGNITION_ERROR_NETWORK,
25
26 // Not allowed for privacy or security reasons.
27 SPEECH_RECOGNITION_ERROR_NOT_ALLOWED,
28
29 // No speech heard before timeout.
30 SPEECH_RECOGNITION_ERROR_NO_SPEECH,
31
32 // Speech was heard, but could not be interpreted.
33 SPEECH_RECOGNITION_ERROR_NO_MATCH,
34
35 // There was an error in the speech recognition grammar.
36 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR,
37 SPEECH_RECOGNITION_ERROR_LAST = SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR,
14 }; 38 };
15 39
16 // Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error. 40 // Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error.
17 enum SpeechAudioErrorDetails { 41 enum SpeechAudioErrorDetails {
18 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0, 42 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0,
19 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC, 43 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC,
20 SPEECH_AUDIO_ERROR_DETAILS_LAST = SPEECH_AUDIO_ERROR_DETAILS_NO_MIC 44 SPEECH_AUDIO_ERROR_DETAILS_LAST = SPEECH_AUDIO_ERROR_DETAILS_NO_MIC
21 }; 45 };
22 46
23 struct CONTENT_EXPORT SpeechRecognitionError { 47 struct CONTENT_EXPORT SpeechRecognitionError {
(...skipping 11 matching lines...) Expand all
35 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, 59 SpeechRecognitionError(SpeechRecognitionErrorCode code_value,
36 SpeechAudioErrorDetails details_value) 60 SpeechAudioErrorDetails details_value)
37 : code(code_value), 61 : code(code_value),
38 details(details_value) { 62 details(details_value) {
39 } 63 }
40 }; 64 };
41 65
42 } // namespace content 66 } // namespace content
43 67
44 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ 68 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_
OLDNEW
« no previous file with comments | « content/public/common/screen_orientation_values_list.h ('k') | content/public/common/speech_recognition_error_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698