OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 enum SpeechAudioErrorDetails { | 31 enum SpeechAudioErrorDetails { |
32 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0, | 32 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0, |
33 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC, | 33 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC, |
34 SPEECH_AUDIO_ERROR_DETAILS_IN_USE | 34 SPEECH_AUDIO_ERROR_DETAILS_IN_USE |
35 }; | 35 }; |
36 | 36 |
37 struct CONTENT_EXPORT SpeechRecognitionError { | 37 struct CONTENT_EXPORT SpeechRecognitionError { |
38 SpeechRecognitionErrorCode code; | 38 SpeechRecognitionErrorCode code; |
39 SpeechAudioErrorDetails details; | 39 SpeechAudioErrorDetails details; |
40 | 40 |
41 SpeechRecognitionError(SpeechRecognitionErrorCode code_value) | 41 SpeechRecognitionError() |
| 42 : code(SPEECH_RECOGNITION_ERROR_NONE), |
| 43 details(SPEECH_AUDIO_ERROR_DETAILS_NONE) { |
| 44 } |
| 45 explicit SpeechRecognitionError(SpeechRecognitionErrorCode code_value) |
42 : code(code_value), | 46 : code(code_value), |
43 details(SPEECH_AUDIO_ERROR_DETAILS_NONE) {} | 47 details(SPEECH_AUDIO_ERROR_DETAILS_NONE) { |
| 48 } |
44 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, | 49 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, |
45 SpeechAudioErrorDetails details_value) | 50 SpeechAudioErrorDetails details_value) |
46 : code(code_value), | 51 : code(code_value), |
47 details(details_value) {} | 52 details(details_value) { |
| 53 } |
48 }; | 54 }; |
49 | 55 |
50 } // namespace content | 56 } // namespace content |
51 | 57 |
52 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ | 58 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ |
OLD | NEW |