| 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 392350662585bef43b0d3d7a8c6a970feff78904..5045a35d381d2cf605d1d1f6c4bf3a37315afaf1 100644
|
| --- a/chrome/browser/speech/speech_input_extension_manager.h
|
| +++ b/chrome/browser/speech/speech_input_extension_manager.h
|
| @@ -11,18 +11,18 @@
|
| #include "base/callback_forward.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/string16.h"
|
| #include "base/synchronization/lock.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/speech_recognition_event_listener.h"
|
|
|
| class Profile;
|
| -class SpeechRecognitionTrayIconController;
|
|
|
| namespace content {
|
| class NotificationRegistrar;
|
| struct SpeechRecognitionError;
|
| +class SpeechRecognitionManager;
|
| struct SpeechRecognitionResult;
|
| -class SpeechRecognizer;
|
| }
|
|
|
| namespace net {
|
| @@ -39,10 +39,11 @@ class SpeechInputExtensionInterface {
|
| virtual void StartRecording(
|
| content::SpeechRecognitionEventListener* listener,
|
| net::URLRequestContextGetter* context_getter,
|
| - int session_id,
|
| + const string16& extension_name,
|
| const std::string& language,
|
| const std::string& grammar,
|
| - bool filter_profanities) = 0;
|
| + bool filter_profanities,
|
| + bool show_notification) = 0;
|
|
|
| virtual void StopRecording(bool recognition_failed) = 0;
|
| virtual bool HasAudioInputDevices() = 0;
|
| @@ -143,19 +144,22 @@ class SpeechInputExtensionManager
|
| virtual void StartRecording(
|
| content::SpeechRecognitionEventListener* listener,
|
| net::URLRequestContextGetter* context_getter,
|
| - int session_id,
|
| + const string16& extension_name,
|
| const std::string& language,
|
| const std::string& grammar,
|
| - bool filter_profanities) OVERRIDE;
|
| + bool filter_profanities,
|
| + bool show_notification) OVERRIDE;
|
|
|
| virtual void StopRecording(bool recognition_failed) OVERRIDE;
|
|
|
| // Internal methods.
|
| void StartOnIOThread(
|
| - net::URLRequestContextGetter* context_getter,
|
| + scoped_refptr<net::URLRequestContextGetter> context_getter,
|
| + const string16& extension_name,
|
| const std::string& language,
|
| const std::string& grammar,
|
| - bool filter_profanities);
|
| + bool filter_profanities,
|
| + bool show_notification);
|
| void ForceStopOnIOThread();
|
| void IsRecordingOnIOThread(const IsRecordingCallback& callback);
|
|
|
| @@ -172,9 +176,10 @@ class SpeechInputExtensionManager
|
| const std::string& json_args);
|
| void ExtensionUnloaded(const std::string& extension_id);
|
|
|
| - void SetInputVolumeOnUIThread(float volume);
|
| void ResetToIdleState();
|
|
|
| + void AbortAllSessionsOnIOThread();
|
| +
|
| virtual ~SpeechInputExtensionManager();
|
|
|
| friend class base::RefCountedThreadSafe<SpeechInputExtensionManager>;
|
| @@ -196,10 +201,10 @@ class SpeechInputExtensionManager
|
| // Used in the UI thread.
|
| scoped_ptr<content::NotificationRegistrar> registrar_;
|
| SpeechInputExtensionInterface* speech_interface_;
|
| - scoped_refptr<SpeechRecognitionTrayIconController> notification_;
|
|
|
| // Used in the IO thread.
|
| - scoped_refptr<content::SpeechRecognizer> recognizer_;
|
| + bool is_recognition_in_progress_;
|
| + int speech_recognition_session_id_;
|
| };
|
|
|
| #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_MANAGER_H_
|
|
|