Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
| 6 #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 6 #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
| 7 | 7 |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "media/audio/audio_input_controller.h" | 10 #include "media/audio/audio_input_controller.h" |
| 11 #include "chrome/browser/speech/speech_recognition_request.h" | 11 #include "chrome/browser/speech/speech_recognition_request.h" |
|
tfarina
2010/08/24 20:41:37
wow!
Please, could you sort these alphabetical?
| |
| 12 #include "chrome/browser/speech/endpointer/endpointer.h" | |
| 12 #include <list> | 13 #include <list> |
|
tfarina
2010/08/24 20:41:37
These headers should be included before "base/ref_
| |
| 13 #include <string> | 14 #include <string> |
| 14 #include <utility> | 15 #include <utility> |
| 15 | 16 |
| 16 namespace speech_input { | 17 namespace speech_input { |
| 17 | 18 |
| 18 // Holds the details of a particular webkit element making a speech request. | 19 // Holds the details of a particular webkit element making a speech request. |
| 19 // SpeechInputCallerId::first holds the ID of the render view and | 20 // SpeechInputCallerId::first holds the ID of the render view and |
| 20 // SpeechInputCallerId::second holds the request ID given by the element. | 21 // SpeechInputCallerId::second holds the request ID given by the element. |
| 21 typedef std::pair<int, int> SpeechInputCallerId; | 22 typedef std::pair<int, int> SpeechInputCallerId; |
| 22 | 23 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 Delegate* delegate_; | 89 Delegate* delegate_; |
| 89 SpeechInputCallerId caller_id_; | 90 SpeechInputCallerId caller_id_; |
| 90 | 91 |
| 91 // Buffer holding the recorded audio. Owns the strings inside the list. | 92 // Buffer holding the recorded audio. Owns the strings inside the list. |
| 92 typedef std::list<std::string*> AudioBufferQueue; | 93 typedef std::list<std::string*> AudioBufferQueue; |
| 93 AudioBufferQueue audio_buffers_; | 94 AudioBufferQueue audio_buffers_; |
| 94 | 95 |
| 95 scoped_ptr<SpeechRecognitionRequest> request_; | 96 scoped_ptr<SpeechRecognitionRequest> request_; |
| 96 scoped_refptr<media::AudioInputController> audio_controller_; | 97 scoped_refptr<media::AudioInputController> audio_controller_; |
| 97 scoped_ptr<SpeexEncoder> encoder_; | 98 scoped_ptr<SpeexEncoder> encoder_; |
| 99 Endpointer endpointer_; | |
| 98 | 100 |
| 99 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizer); | 101 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizer); |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 // This typedef is to workaround the issue with certain versions of | 104 // This typedef is to workaround the issue with certain versions of |
| 103 // Visual Studio where it gets confused between multiple Delegate | 105 // Visual Studio where it gets confused between multiple Delegate |
| 104 // classes and gives a C2500 error. (I saw this error on the try bots - | 106 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 105 // the workaround was not needed for my machine). | 107 // the workaround was not needed for my machine). |
| 106 typedef SpeechRecognizer::Delegate SpeechRecognizerDelegate; | 108 typedef SpeechRecognizer::Delegate SpeechRecognizerDelegate; |
| 107 | 109 |
| 108 } // namespace speech_input | 110 } // namespace speech_input |
| 109 | 111 |
| 110 #endif // CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 112 #endif // CHROME_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
| OLD | NEW |