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 CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ |
6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ | 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
15 #include "content/public/browser/speech_recognition_event_listener.h" | 15 #include "content/public/browser/speech_recognition_event_listener.h" |
16 | 16 |
17 class Profile; | 17 class Profile; |
18 | 18 |
| 19 namespace base { |
| 20 class ListValue; |
| 21 } |
| 22 |
19 namespace content { | 23 namespace content { |
20 class NotificationRegistrar; | 24 class NotificationRegistrar; |
21 struct SpeechRecognitionError; | 25 struct SpeechRecognitionError; |
22 class SpeechRecognitionManager; | 26 class SpeechRecognitionManager; |
23 struct SpeechRecognitionResult; | 27 struct SpeechRecognitionResult; |
24 } | 28 } |
25 | 29 |
26 namespace net { | 30 namespace net { |
27 class URLRequestContextGetter; | 31 class URLRequestContextGetter; |
28 } | 32 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void SetRecognitionResultOnUIThread( | 169 void SetRecognitionResultOnUIThread( |
166 const content::SpeechRecognitionResult& result, | 170 const content::SpeechRecognitionResult& result, |
167 const std::string& extension_id); | 171 const std::string& extension_id); |
168 void DidStartReceivingAudioOnUIThread(); | 172 void DidStartReceivingAudioOnUIThread(); |
169 void StopSucceededOnUIThread(); | 173 void StopSucceededOnUIThread(); |
170 void IsRecordingOnUIThread(const IsRecordingCallback& callback, bool result); | 174 void IsRecordingOnUIThread(const IsRecordingCallback& callback, bool result); |
171 | 175 |
172 void DispatchError(const std::string& error, bool dispatch_event); | 176 void DispatchError(const std::string& error, bool dispatch_event); |
173 void DispatchEventToExtension(const std::string& extension_id, | 177 void DispatchEventToExtension(const std::string& extension_id, |
174 const std::string& event, | 178 const std::string& event, |
175 const std::string& json_args); | 179 scoped_ptr<base::ListValue> event_args); |
176 void ExtensionUnloaded(const std::string& extension_id); | 180 void ExtensionUnloaded(const std::string& extension_id); |
177 | 181 |
178 void ResetToIdleState(); | 182 void ResetToIdleState(); |
179 | 183 |
180 void AbortAllSessionsOnIOThread(); | 184 void AbortAllSessionsOnIOThread(); |
181 | 185 |
182 int GetRenderProcessIDForExtension(const std::string& extension_id) const; | 186 int GetRenderProcessIDForExtension(const std::string& extension_id) const; |
183 | 187 |
184 virtual ~SpeechInputExtensionManager(); | 188 virtual ~SpeechInputExtensionManager(); |
185 | 189 |
(...skipping 16 matching lines...) Expand all Loading... |
202 // Used in the UI thread. | 206 // Used in the UI thread. |
203 scoped_ptr<content::NotificationRegistrar> registrar_; | 207 scoped_ptr<content::NotificationRegistrar> registrar_; |
204 SpeechInputExtensionInterface* speech_interface_; | 208 SpeechInputExtensionInterface* speech_interface_; |
205 | 209 |
206 // Used in the IO thread. | 210 // Used in the IO thread. |
207 bool is_recognition_in_progress_; | 211 bool is_recognition_in_progress_; |
208 int speech_recognition_session_id_; | 212 int speech_recognition_session_id_; |
209 }; | 213 }; |
210 | 214 |
211 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ | 215 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_ |
OLD | NEW |