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