| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 public SpeechRecognitionEventListener { | 54 public SpeechRecognitionEventListener { |
| 55 public: | 55 public: |
| 56 // Returns the current SpeechRecognitionManagerImpl or NULL if the call is | 56 // Returns the current SpeechRecognitionManagerImpl or NULL if the call is |
| 57 // issued when it is not created yet or destroyed (by BrowserMainLoop). | 57 // issued when it is not created yet or destroyed (by BrowserMainLoop). |
| 58 static SpeechRecognitionManagerImpl* GetInstance(); | 58 static SpeechRecognitionManagerImpl* GetInstance(); |
| 59 | 59 |
| 60 // SpeechRecognitionManager implementation. | 60 // SpeechRecognitionManager implementation. |
| 61 int CreateSession(const SpeechRecognitionSessionConfig& config) override; | 61 int CreateSession(const SpeechRecognitionSessionConfig& config) override; |
| 62 void StartSession(int session_id) override; | 62 void StartSession(int session_id) override; |
| 63 void AbortSession(int session_id) override; | 63 void AbortSession(int session_id) override; |
| 64 void AbortAllSessionsForRenderProcess(int render_process_id) override; | 64 void AbortAllSessionsForRenderFrame(int render_process_id, |
| 65 void AbortAllSessionsForRenderView(int render_process_id, | 65 int render_frame_id) override; |
| 66 int render_view_id) override; | |
| 67 void StopAudioCaptureForSession(int session_id) override; | 66 void StopAudioCaptureForSession(int session_id) override; |
| 68 const SpeechRecognitionSessionConfig& GetSessionConfig( | 67 const SpeechRecognitionSessionConfig& GetSessionConfig( |
| 69 int session_id) const override; | 68 int session_id) const override; |
| 70 SpeechRecognitionSessionContext GetSessionContext( | 69 SpeechRecognitionSessionContext GetSessionContext( |
| 71 int session_id) const override; | 70 int session_id) const override; |
| 72 int GetSession(int render_process_id, | 71 int GetSession(int render_process_id, |
| 73 int render_view_id, | 72 int render_frame_id, |
| 74 int request_id) const override; | 73 int request_id) const override; |
| 75 bool HasAudioInputDevices() override; | 74 bool HasAudioInputDevices() override; |
| 76 base::string16 GetAudioInputDeviceModel() override; | 75 base::string16 GetAudioInputDeviceModel() override; |
| 77 void ShowAudioInputSettings() override; | 76 void ShowAudioInputSettings() override; |
| 78 | 77 |
| 79 // SpeechRecognitionEventListener methods. | 78 // SpeechRecognitionEventListener methods. |
| 80 void OnRecognitionStart(int session_id) override; | 79 void OnRecognitionStart(int session_id) override; |
| 81 void OnAudioStart(int session_id) override; | 80 void OnAudioStart(int session_id) override; |
| 82 void OnEnvironmentEstimationComplete(int session_id) override; | 81 void OnEnvironmentEstimationComplete(int session_id) override; |
| 83 void OnSoundStart(int session_id) override; | 82 void OnSoundStart(int session_id) override; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 183 |
| 185 // Used for posting asynchronous tasks (on the IO thread) without worrying | 184 // Used for posting asynchronous tasks (on the IO thread) without worrying |
| 186 // about this class being destroyed in the meanwhile (due to browser shutdown) | 185 // about this class being destroyed in the meanwhile (due to browser shutdown) |
| 187 // since tasks pending on a destroyed WeakPtr are automatically discarded. | 186 // since tasks pending on a destroyed WeakPtr are automatically discarded. |
| 188 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; | 187 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; |
| 189 }; | 188 }; |
| 190 | 189 |
| 191 } // namespace content | 190 } // namespace content |
| 192 | 191 |
| 193 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ | 192 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ |
| OLD | NEW |