| 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 4ef6b824bc02a0f8a348bc172ee604681855cb67..6e6122c8f494db741f2506e1c6ff995328310f36 100644
|
| --- a/chrome/browser/speech/speech_input_extension_manager.h
|
| +++ b/chrome/browser/speech/speech_input_extension_manager.h
|
| @@ -11,19 +11,19 @@
|
| #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 Extension;
|
| class Profile;
|
| -class SpeechRecognitionTrayIconController;
|
|
|
| namespace content {
|
| class NotificationRegistrar;
|
| struct SpeechRecognitionError;
|
| +class SpeechRecognitionManager;
|
| struct SpeechRecognitionResult;
|
| -class SpeechRecognizer;
|
| }
|
|
|
| namespace net {
|
| @@ -40,10 +40,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;
|
| @@ -144,19 +145,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);
|
|
|
| @@ -173,7 +177,6 @@ class SpeechInputExtensionManager
|
| const std::string& json_args);
|
| void ExtensionUnloaded(const std::string& extension_id);
|
|
|
| - void SetInputVolumeOnUIThread(float volume);
|
| void ResetToIdleState();
|
|
|
| virtual ~SpeechInputExtensionManager();
|
| @@ -197,10 +200,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_
|
|
|