| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INPUT_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 private: | 140 private: |
| 141 struct SpeechInputRequest { | 141 struct SpeechInputRequest { |
| 142 SpeechInputRequest(); | 142 SpeechInputRequest(); |
| 143 ~SpeechInputRequest(); | 143 ~SpeechInputRequest(); |
| 144 | 144 |
| 145 Delegate* delegate; | 145 Delegate* delegate; |
| 146 scoped_refptr<SpeechRecognizer> recognizer; | 146 scoped_refptr<SpeechRecognizer> recognizer; |
| 147 bool is_active; // Set to true when recording or recognition is going on. | 147 bool is_active; // Set to true when recording or recognition is going on. |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 struct SpeechInputParams; |
| 151 |
| 150 Delegate* GetDelegate(int caller_id) const; | 152 Delegate* GetDelegate(int caller_id) const; |
| 151 | 153 |
| 154 void CheckRenderViewTypeAndStartRecognition(const SpeechInputParams& params); |
| 155 void ProceedStartingRecognition(const SpeechInputParams& params); |
| 156 |
| 152 typedef std::map<int, SpeechInputRequest> SpeechRecognizerMap; | 157 typedef std::map<int, SpeechInputRequest> SpeechRecognizerMap; |
| 153 SpeechRecognizerMap requests_; | 158 SpeechRecognizerMap requests_; |
| 154 std::string request_info_; | 159 std::string request_info_; |
| 155 bool can_report_metrics_; | 160 bool can_report_metrics_; |
| 156 int recording_caller_id_; | 161 int recording_caller_id_; |
| 157 }; | 162 }; |
| 158 | 163 |
| 159 // This typedef is to workaround the issue with certain versions of | 164 // This typedef is to workaround the issue with certain versions of |
| 160 // Visual Studio where it gets confused between multiple Delegate | 165 // Visual Studio where it gets confused between multiple Delegate |
| 161 // classes and gives a C2500 error. (I saw this error on the try bots - | 166 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 162 // the workaround was not needed for my machine). | 167 // the workaround was not needed for my machine). |
| 163 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; | 168 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; |
| 164 | 169 |
| 165 } // namespace speech_input | 170 } // namespace speech_input |
| 166 | 171 |
| 167 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ | 172 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
| OLD | NEW |