Chromium Code Reviews| Index: chrome/browser/speech/speech_input_extension_manager.h |
| diff --git a/chrome/browser/speech/speech_input_extension_manager.h b/chrome/browser/speech/speech_input_extension_manager.h |
| index aaf612dd7db66b6bdd2955a67f65197ce2b483fd..e0e04485ea68c08977560e86b2d1e677fe514728 100644 |
| --- a/chrome/browser/speech/speech_input_extension_manager.h |
| +++ b/chrome/browser/speech/speech_input_extension_manager.h |
| @@ -13,7 +13,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/synchronization/lock.h" |
| #include "content/public/browser/notification_observer.h" |
| -#include "content/public/browser/speech_recognizer_delegate.h" |
| +#include "content/public/browser/speech_recognition_event_listener.h" |
| class Extension; |
| class Profile; |
| @@ -36,7 +36,7 @@ class SpeechInputExtensionInterface { |
| // Called from the IO thread. |
| virtual void StartRecording( |
| - content::SpeechRecognizerDelegate* delegate, |
| + content::SpeechRecognitionEventListener* delegate, |
|
hans
2012/03/13 14:32:46
rename the parameter to "listener" or "event_liste
Primiano Tucci (use gerrit)
2012/03/14 09:40:35
Done.
|
| net::URLRequestContextGetter* context_getter, |
| int caller_id, |
|
Satish
2012/03/13 15:30:15
change caller_id to session_id throughout
Primiano Tucci (use gerrit)
2012/03/14 09:40:35
Hmm, I think I'll name all caller_id (below) for n
|
| const std::string& language, |
| @@ -55,7 +55,7 @@ class SpeechInputExtensionInterface { |
| // associated to the given profile. |
| class SpeechInputExtensionManager |
| : public base::RefCountedThreadSafe<SpeechInputExtensionManager>, |
| - public content::SpeechRecognizerDelegate, |
| + public content::SpeechRecognitionEventListener, |
| public content::NotificationObserver, |
| private SpeechInputExtensionInterface { |
| public: |
| @@ -114,22 +114,21 @@ class SpeechInputExtensionManager |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) OVERRIDE; |
| - // Methods from SpeechRecognizerDelegate. |
| - virtual void SetRecognitionResult( |
| - int caller_id, |
| - const content::SpeechRecognitionResult& result) OVERRIDE; |
| - |
| - virtual void DidStartReceivingAudio(int caller_id) OVERRIDE; |
| - virtual void DidCompleteRecording(int caller_id) OVERRIDE; |
| - virtual void DidCompleteRecognition(int caller_id) OVERRIDE; |
| - virtual void DidStartReceivingSpeech(int caller_id) OVERRIDE; |
| - virtual void DidStopReceivingSpeech(int caller_id) OVERRIDE; |
| - virtual void OnRecognizerError(int caller_id, |
| - content::SpeechRecognitionErrorCode error) |
| - OVERRIDE; |
| - virtual void DidCompleteEnvironmentEstimation(int caller_id) OVERRIDE; |
| - virtual void SetInputVolume(int caller_id, float volume, |
| - float noise_volume) OVERRIDE; |
| + // Methods from SpeechRecognitionEventListener. |
| + virtual void OnRecognitionStart(int session_id) OVERRIDE; |
| + virtual void OnAudioStart(int session_id) OVERRIDE; |
| + virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE; |
| + virtual void OnSoundStart(int session_id) OVERRIDE; |
| + virtual void OnSoundEnd(int session_id) OVERRIDE; |
| + virtual void OnAudioEnd(int session_id) OVERRIDE; |
| + virtual void OnRecognitionResult( |
| + int session_id, const content::SpeechRecognitionResult& result) OVERRIDE; |
| + virtual void OnRecognitionError( |
| + int session_id, |
| + const content::SpeechRecognitionErrorCode& error) OVERRIDE; |
| + virtual void OnAudioLevelsChanged(int session_id, float volume, |
| + float noise_volume) OVERRIDE; |
| + virtual void OnRecognitionEnd(int session_id, bool success) OVERRIDE; |
| // Methods for API testing. |
| void SetSpeechInputExtensionInterface( |
| @@ -142,7 +141,7 @@ class SpeechInputExtensionManager |
| virtual bool HasAudioInputDevices() OVERRIDE; |
| virtual bool HasValidRecognizer() OVERRIDE; |
| virtual void StartRecording( |
| - content::SpeechRecognizerDelegate* delegate, |
| + content::SpeechRecognitionEventListener* delegate, |
|
hans
2012/03/13 14:32:46
dito
Primiano Tucci (use gerrit)
2012/03/14 09:40:35
Done.
|
| net::URLRequestContextGetter* context_getter, |
| int caller_id, |
| const std::string& language, |