summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech/speech_input_bubble_controller.h
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 06:11:06 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 06:11:06 +0000
commit4038d2dcf68d300f44032f98f9323c341cef4333 (patch)
treea301fc5106d4849ac31b2f607909b3d51b5a48ca /chrome/browser/speech/speech_input_bubble_controller.h
parent189b01cd199726bd100fcd66fcbaee4f898c04a4 (diff)
downloadchromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.zip
chromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.tar.gz
chromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.tar.bz2
In speech input, introduce a 'warm up' screen for slow audio capture devices.
In some hardware/OS configurations it takes several hundred milliseconds to seconds for the audio driver to get initialised and start giving audio to the application. We start by showing an empty bubble and if audio was received within 500ms the usual volume meter becomes visible. If audio data was not received within 500ms we start showing a light gray spinner animation to signal that things aren't ready yet to start speaking. BUG=61677 TEST=unit_tests and browser_tests with --gtest_filter=Speech* Review URL: http://codereview.chromium.org/6720031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech/speech_input_bubble_controller.h')
-rw-r--r--chrome/browser/speech/speech_input_bubble_controller.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/speech/speech_input_bubble_controller.h b/chrome/browser/speech/speech_input_bubble_controller.h
index c690fae..c09f184 100644
--- a/chrome/browser/speech/speech_input_bubble_controller.h
+++ b/chrome/browser/speech/speech_input_bubble_controller.h
@@ -55,6 +55,10 @@ class SpeechInputBubbleController
int render_view_id,
const gfx::Rect& element_rect);
+ // Indicates to the user that audio hardware is warming up. This also makes
+ // the bubble visible if not already visible.
+ void SetBubbleWarmUpMode(int caller_id);
+
// Indicates to the user that audio recording is in progress. This also makes
// the bubble visible if not already visible.
void SetBubbleRecordingMode(int caller_id);
@@ -84,6 +88,7 @@ class SpeechInputBubbleController
private:
// The various calls received by this object and handled in the UI thread.
enum RequestType {
+ REQUEST_SET_WARM_UP_MODE,
REQUEST_SET_RECORDING_MODE,
REQUEST_SET_RECOGNIZING_MODE,
REQUEST_SET_MESSAGE,
@@ -116,7 +121,7 @@ class SpeechInputBubbleController
// Only accessed in the IO thread.
Delegate* delegate_;
- //*** The following are accessed only in the UI thread.
+ // *** The following are accessed only in the UI thread.
// The caller id for currently visible bubble (since only one bubble is
// visible at any time).