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

Unified Diff: chrome/browser/extensions/extension_speech_input_api.h

Issue 8201030: Introducing the basic functionality to the speech input experimental API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/extensions/extension_speech_input_api.h
diff --git a/chrome/browser/extensions/extension_speech_input_api.h b/chrome/browser/extensions/extension_speech_input_api.h
index 46b8db3ffcbdf03717385c4d82ec57794ce07221..b4a1c940294059debacff1103180fa6700c52cd9 100644
--- a/chrome/browser/extensions/extension_speech_input_api.h
+++ b/chrome/browser/extensions/extension_speech_input_api.h
@@ -21,6 +21,11 @@ class SpeechInputAsyncFunction : public AsyncExtensionFunction,
virtual void Run() OVERRIDE;
virtual bool RunImpl() = 0;
+ virtual int StartState() = 0;
Satish 2011/10/08 23:15:07 it may be simpler to define 4 const integers as me
Leandro GraciĆ” Gil 2011/10/09 10:29:21 Done.
+ virtual int TransitionState() = 0;
+ virtual int EndState() = 0;
+ virtual int TransitionNotification() = 0;
+
private:
// NotificationObserver.
virtual void Observe(int type,
@@ -28,6 +33,7 @@ class SpeechInputAsyncFunction : public AsyncExtensionFunction,
const NotificationDetails& details) OVERRIDE;
NotificationRegistrar registrar_;
+ bool failed_;
};
// Implements experimental.speechInput.start.
@@ -35,6 +41,11 @@ class StartSpeechInputFunction : public SpeechInputAsyncFunction {
protected:
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.start");
+
+ virtual int StartState() OVERRIDE;
+ virtual int TransitionState() OVERRIDE;
+ virtual int EndState() OVERRIDE;
+ virtual int TransitionNotification() OVERRIDE;
};
// Implements experimental.speechInput.stop.
@@ -42,10 +53,15 @@ class StopSpeechInputFunction : public SpeechInputAsyncFunction {
protected:
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.stop");
+
+ virtual int StartState() OVERRIDE;
+ virtual int TransitionState() OVERRIDE;
+ virtual int EndState() OVERRIDE;
+ virtual int TransitionNotification() OVERRIDE;
};
// Implements experimental.speechInput.isRecording.
-class IsRecordingSpeechInputFunction : public SyncIOThreadExtensionFunction {
+class IsRecordingSpeechInputFunction : public SyncExtensionFunction {
protected:
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording");

Powered by Google App Engine
This is Rietveld 408576698