diff options
Diffstat (limited to 'WebCore/page/SpeechInputClient.h')
-rw-r--r-- | WebCore/page/SpeechInputClient.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/WebCore/page/SpeechInputClient.h b/WebCore/page/SpeechInputClient.h index f6c61cf..87ff7b9 100644 --- a/WebCore/page/SpeechInputClient.h +++ b/WebCore/page/SpeechInputClient.h @@ -40,15 +40,22 @@ class SpeechInputListener; // Provides an interface for SpeechInput to call into the embedder. class SpeechInputClient { public: - virtual bool startRecognition(SpeechInputListener* listener) = 0; + // This is the first call made by a listener, registering itself for future callbacks. + // When the listener no longer needs speech input (for e.g. when it gets destroyed), + // it should set a null listener to stop receiving callbacks. + // The client does not take ownership of the pointer. + virtual void setListener(SpeechInputListener*) = 0; + + // Starts speech recognition and audio recording. + virtual bool startRecognition(int requestId) = 0; // Stops audio recording and performs recognition with the audio recorded until now // (does not discard audio). - virtual void stopRecording() = 0; + virtual void stopRecording(int requestId) = 0; // Cancels an ongoing recognition and discards any audio recorded so far. No partial // recognition results are returned to the listener. - virtual void cancelRecognition() = 0; + virtual void cancelRecognition(int requestId) = 0; protected: virtual ~SpeechInputClient() { } |