| 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_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
| 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // implementations). | 40 // implementations). |
| 41 virtual void OnSpeechRecognitionEngineResult( | 41 virtual void OnSpeechRecognitionEngineResult( |
| 42 const content::SpeechRecognitionResult& result) = 0; | 42 const content::SpeechRecognitionResult& result) = 0; |
| 43 virtual void OnSpeechRecognitionEngineError( | 43 virtual void OnSpeechRecognitionEngineError( |
| 44 const content::SpeechRecognitionError& error) = 0; | 44 const content::SpeechRecognitionError& error) = 0; |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 virtual ~Delegate() {} | 47 virtual ~Delegate() {} |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Remove engine configuration. | 50 // Remote engine configuration. |
| 51 struct Config { | 51 struct Config { |
| 52 Config(); | 52 Config(); |
| 53 ~Config(); | 53 ~Config(); |
| 54 | 54 |
| 55 std::string language; | 55 std::string language; |
| 56 content::SpeechRecognitionGrammarArray grammars; | 56 content::SpeechRecognitionGrammarArray grammars; |
| 57 bool filter_profanities; | 57 bool filter_profanities; |
| 58 std::string hardware_info; | 58 std::string hardware_info; |
| 59 std::string origin_url; | 59 std::string origin_url; |
| 60 int audio_sample_rate; | 60 int audio_sample_rate; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // These typedefs are to workaround the issue with certain versions of | 104 // These typedefs are to workaround the issue with certain versions of |
| 105 // Visual Studio where it gets confused between multiple Delegate | 105 // Visual Studio where it gets confused between multiple Delegate |
| 106 // classes and gives a C2500 error. | 106 // classes and gives a C2500 error. |
| 107 typedef SpeechRecognitionEngine::Delegate SpeechRecognitionEngineDelegate; | 107 typedef SpeechRecognitionEngine::Delegate SpeechRecognitionEngineDelegate; |
| 108 typedef SpeechRecognitionEngine::Config SpeechRecognitionEngineConfig; | 108 typedef SpeechRecognitionEngine::Config SpeechRecognitionEngineConfig; |
| 109 | 109 |
| 110 } // namespace speech | 110 } // namespace speech |
| 111 | 111 |
| 112 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 112 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
| OLD | NEW |