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_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ |
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual void ShowAudioInputSettings() OVERRIDE; | 74 virtual void ShowAudioInputSettings() OVERRIDE; |
75 | 75 |
76 // SpeechRecognitionEventListener methods. | 76 // SpeechRecognitionEventListener methods. |
77 virtual void OnRecognitionStart(int session_id) OVERRIDE; | 77 virtual void OnRecognitionStart(int session_id) OVERRIDE; |
78 virtual void OnAudioStart(int session_id) OVERRIDE; | 78 virtual void OnAudioStart(int session_id) OVERRIDE; |
79 virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE; | 79 virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE; |
80 virtual void OnSoundStart(int session_id) OVERRIDE; | 80 virtual void OnSoundStart(int session_id) OVERRIDE; |
81 virtual void OnSoundEnd(int session_id) OVERRIDE; | 81 virtual void OnSoundEnd(int session_id) OVERRIDE; |
82 virtual void OnAudioEnd(int session_id) OVERRIDE; | 82 virtual void OnAudioEnd(int session_id) OVERRIDE; |
83 virtual void OnRecognitionEnd(int session_id) OVERRIDE; | 83 virtual void OnRecognitionEnd(int session_id) OVERRIDE; |
84 virtual void OnRecognitionResults( | 84 virtual void OnRecognitionResult( |
85 int session_id, const SpeechRecognitionResults& result) OVERRIDE; | 85 int session_id, const SpeechRecognitionResult& result) OVERRIDE; |
86 virtual void OnRecognitionError( | 86 virtual void OnRecognitionError( |
87 int session_id, const SpeechRecognitionError& error) OVERRIDE; | 87 int session_id, const SpeechRecognitionError& error) OVERRIDE; |
88 virtual void OnAudioLevelsChange(int session_id, float volume, | 88 virtual void OnAudioLevelsChange(int session_id, float volume, |
89 float noise_volume) OVERRIDE; | 89 float noise_volume) OVERRIDE; |
90 | 90 |
91 protected: | 91 protected: |
92 // BrowserMainLoop is the only one allowed to istantiate and free us. | 92 // BrowserMainLoop is the only one allowed to istantiate and free us. |
93 friend class BrowserMainLoop; | 93 friend class BrowserMainLoop; |
94 friend class scoped_ptr<SpeechRecognitionManagerImpl>; // Needed for dtor. | 94 friend class scoped_ptr<SpeechRecognitionManagerImpl>; // Needed for dtor. |
95 SpeechRecognitionManagerImpl(); | 95 SpeechRecognitionManagerImpl(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 // Used for posting asynchronous tasks (on the IO thread) without worrying | 171 // Used for posting asynchronous tasks (on the IO thread) without worrying |
172 // about this class being destroyed in the meanwhile (due to browser shutdown) | 172 // about this class being destroyed in the meanwhile (due to browser shutdown) |
173 // since tasks pending on a destroyed WeakPtr are automatically discarded. | 173 // since tasks pending on a destroyed WeakPtr are automatically discarded. |
174 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; | 174 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; |
175 }; | 175 }; |
176 | 176 |
177 } // namespace content | 177 } // namespace content |
178 | 178 |
179 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ | 179 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ |
OLD | NEW |