| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/browser/speech/endpointer/endpointer.h" | 10 #include "content/browser/speech/endpointer/endpointer.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Callback called on IO thread by audio_controller->Close(). | 126 // Callback called on IO thread by audio_controller->Close(). |
| 127 void OnAudioClosed(media::AudioInputController*); | 127 void OnAudioClosed(media::AudioInputController*); |
| 128 | 128 |
| 129 // AudioInputController::EventHandler methods. | 129 // AudioInputController::EventHandler methods. |
| 130 virtual void OnCreated(media::AudioInputController* controller) OVERRIDE {} | 130 virtual void OnCreated(media::AudioInputController* controller) OVERRIDE {} |
| 131 virtual void OnRecording(media::AudioInputController* controller) OVERRIDE {} | 131 virtual void OnRecording(media::AudioInputController* controller) OVERRIDE {} |
| 132 virtual void OnError(media::AudioInputController* controller, | 132 virtual void OnError(media::AudioInputController* controller, |
| 133 media::AudioInputController::ErrorCode error_code) OVERRIDE; | 133 media::AudioInputController::ErrorCode error_code) OVERRIDE; |
| 134 virtual void OnData(media::AudioInputController* controller, | 134 virtual void OnData(media::AudioInputController* controller, |
| 135 const uint8* data, uint32 size) OVERRIDE; | 135 const uint8* data, uint32 size) OVERRIDE; |
| 136 virtual void OnLog(media::AudioInputController* controller, |
| 137 const std::string& message) OVERRIDE {} |
| 136 | 138 |
| 137 // SpeechRecognitionEngineDelegate methods. | 139 // SpeechRecognitionEngineDelegate methods. |
| 138 virtual void OnSpeechRecognitionEngineResults( | 140 virtual void OnSpeechRecognitionEngineResults( |
| 139 const SpeechRecognitionResults& results) OVERRIDE; | 141 const SpeechRecognitionResults& results) OVERRIDE; |
| 140 virtual void OnSpeechRecognitionEngineError( | 142 virtual void OnSpeechRecognitionEngineError( |
| 141 const SpeechRecognitionError& error) OVERRIDE; | 143 const SpeechRecognitionError& error) OVERRIDE; |
| 142 | 144 |
| 143 static media::AudioManager* audio_manager_for_tests_; | 145 static media::AudioManager* audio_manager_for_tests_; |
| 144 | 146 |
| 145 scoped_ptr<SpeechRecognitionEngine> recognition_engine_; | 147 scoped_ptr<SpeechRecognitionEngine> recognition_engine_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 157 // Converts data between native input format and a WebSpeech specific | 159 // Converts data between native input format and a WebSpeech specific |
| 158 // output format. | 160 // output format. |
| 159 scoped_ptr<SpeechRecognizerImpl::OnDataConverter> audio_converter_; | 161 scoped_ptr<SpeechRecognizerImpl::OnDataConverter> audio_converter_; |
| 160 | 162 |
| 161 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImpl); | 163 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImpl); |
| 162 }; | 164 }; |
| 163 | 165 |
| 164 } // namespace content | 166 } // namespace content |
| 165 | 167 |
| 166 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ | 168 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ |
| OLD | NEW |