Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3022)

Unified Diff: chrome/browser/speech/speech_input_extension_manager.h

Issue 10377082: SpeechInputExtensionManager now interface with SpeechRecognitionManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b66732bc0dd4f11337dfa2a6f6c951892438217e 100644
--- a/chrome/browser/speech/speech_input_extension_manager.h
+++ b/chrome/browser/speech/speech_input_extension_manager.h
@@ -8,6 +8,7 @@
#include <string>
+#include "base/string16.h"
hans 2012/05/15 13:35:17 sort order
Primiano Tucci (use gerrit) 2012/05/16 10:16:00 Done.
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -17,13 +18,12 @@
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_

Powered by Google App Engine
This is Rietveld 408576698