diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 11:59:03 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 11:59:03 +0000 |
commit | 6a7746dbcef8cfcef182887a337eb297d476f98e (patch) | |
tree | 2ef8870775cd910bc965bbd98b3a01c5627d67ec /chrome/renderer/speech_input_dispatcher.h | |
parent | 32a99f81432bcc1a8ee515b34e6dfdf81c3fa090 (diff) | |
download | chromium_src-6a7746dbcef8cfcef182887a337eb297d476f98e.zip chromium_src-6a7746dbcef8cfcef182887a337eb297d476f98e.tar.gz chromium_src-6a7746dbcef8cfcef182887a337eb297d476f98e.tar.bz2 |
Displays a speech input UI bubble during speech recognition.
The webkit code passes in display rect of the input element requesting speech input
and we create a UI bubble pointing at this element when starting speech input. The
user can click outside the bubble to close it, which aborts recognition if we were
still recording audio. The user can also click the cancel link in the bubble which
aborts recognition irrespective of what state it is in now.
Added a SpeechInputBubbleController class to take care of marshalling the requests
between the speech input code in IO thread and the UI bubble in the UI thread. Also
added a unit test for this class.
BUG=none
TEST=unit_tests --gtest_filter=SpeechInputBubbleControllerTest.*
Review URL: http://codereview.chromium.org/3156048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/speech_input_dispatcher.h')
-rw-r--r-- | chrome/renderer/speech_input_dispatcher.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/renderer/speech_input_dispatcher.h b/chrome/renderer/speech_input_dispatcher.h index b6f6c4c..188acaa 100644 --- a/chrome/renderer/speech_input_dispatcher.h +++ b/chrome/renderer/speech_input_dispatcher.h @@ -13,6 +13,7 @@ class GURL; class RenderView; namespace WebKit { +struct WebRect; class WebSpeechInputListener; } @@ -28,7 +29,7 @@ class SpeechInputDispatcher : public WebKit::WebSpeechInputController { bool OnMessageReceived(const IPC::Message& msg); // WebKit::WebSpeechInputController. - bool startRecognition(int request_id); + bool startRecognition(int request_id, const WebKit::WebRect& element_rect); void cancelRecognition(int request_id); void stopRecording(int request_id); |