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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual int CreateSession( | 61 virtual int CreateSession( |
62 const SpeechRecognitionSessionConfig& config) OVERRIDE; | 62 const SpeechRecognitionSessionConfig& config) OVERRIDE; |
63 virtual void StartSession(int session_id) OVERRIDE; | 63 virtual void StartSession(int session_id) OVERRIDE; |
64 virtual void AbortSession(int session_id) OVERRIDE; | 64 virtual void AbortSession(int session_id) OVERRIDE; |
65 virtual void AbortAllSessionsForListener( | 65 virtual void AbortAllSessionsForRenderProcess(int render_process_id) OVERRIDE; |
66 SpeechRecognitionEventListener* listener) OVERRIDE; | |
67 virtual void AbortAllSessionsForRenderView(int render_process_id, | 66 virtual void AbortAllSessionsForRenderView(int render_process_id, |
68 int render_view_id) OVERRIDE; | 67 int render_view_id) OVERRIDE; |
69 virtual void StopAudioCaptureForSession(int session_id) OVERRIDE; | 68 virtual void StopAudioCaptureForSession(int session_id) OVERRIDE; |
70 virtual const SpeechRecognitionSessionConfig& GetSessionConfig( | 69 virtual const SpeechRecognitionSessionConfig& GetSessionConfig( |
71 int session_id) const OVERRIDE; | 70 int session_id) const OVERRIDE; |
72 virtual SpeechRecognitionSessionContext GetSessionContext( | 71 virtual SpeechRecognitionSessionContext GetSessionContext( |
73 int session_id) const OVERRIDE; | 72 int session_id) const OVERRIDE; |
74 virtual int GetSession(int render_process_id, | 73 virtual int GetSession(int render_process_id, |
75 int render_view_id, | 74 int render_view_id, |
76 int request_id) const OVERRIDE; | 75 int request_id) const OVERRIDE; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 184 |
186 // Used for posting asynchronous tasks (on the IO thread) without worrying | 185 // Used for posting asynchronous tasks (on the IO thread) without worrying |
187 // about this class being destroyed in the meanwhile (due to browser shutdown) | 186 // about this class being destroyed in the meanwhile (due to browser shutdown) |
188 // since tasks pending on a destroyed WeakPtr are automatically discarded. | 187 // since tasks pending on a destroyed WeakPtr are automatically discarded. |
189 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; | 188 base::WeakPtrFactory<SpeechRecognitionManagerImpl> weak_factory_; |
190 }; | 189 }; |
191 | 190 |
192 } // namespace content | 191 } // namespace content |
193 | 192 |
194 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ | 193 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_MANAGER_IMPL_H_ |
OLD | NEW |