summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech/speech_input_bubble.h
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 13:22:19 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 13:22:19 +0000
commit378eba1a0a9b667759e27abbb1adfb38e55ffe9f (patch)
tree84572a8f0f0f1165d38864f666f9053b812586f6 /chrome/browser/speech/speech_input_bubble.h
parent284e0d6e941b4a87f56cfd7cab70a69194e50cae (diff)
downloadchromium_src-378eba1a0a9b667759e27abbb1adfb38e55ffe9f.zip
chromium_src-378eba1a0a9b667759e27abbb1adfb38e55ffe9f.tar.gz
chromium_src-378eba1a0a9b667759e27abbb1adfb38e55ffe9f.tar.bz2
Earlier we used to show a static image in this state, instead we now show the animation.
The images for each step of the animation are stored horizontally next to each other in a sprite image and during the animation we just draw the same bitmap with the x origin moving around from one step to another and wrapping around. BUG=53598 TEST=manual, start speech recognition, speak something and wait for the animation to show up on screen. Review URL: http://codereview.chromium.org/3417012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech/speech_input_bubble.h')
-rw-r--r--chrome/browser/speech/speech_input_bubble.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/speech/speech_input_bubble.h b/chrome/browser/speech/speech_input_bubble.h
index 73032b5..3faabe0 100644
--- a/chrome/browser/speech/speech_input_bubble.h
+++ b/chrome/browser/speech/speech_input_bubble.h
@@ -6,8 +6,11 @@
#define CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_H_
#pragma once
+#include <vector>
+
#include "base/scoped_ptr.h"
#include "base/string16.h"
+#include "base/task.h"
namespace gfx {
class Rect;
@@ -143,6 +146,13 @@ class SpeechInputBubbleBase : public SpeechInputBubble {
}
private:
+ void DoRecognizingAnimationStep();
+
+ // Task factory used for animation timer.
+ ScopedRunnableMethodFactory<SpeechInputBubbleBase> task_factory_;
+ int animation_step_; // Current index/step of the animation.
+ std::vector<SkBitmap> animation_frames_;
+
DisplayMode display_mode_;
string16 message_text_; // Text displayed in DISPLAY_MODE_MESSAGE
// The current microphone image with volume level indication.
@@ -153,6 +163,8 @@ class SpeechInputBubbleBase : public SpeechInputBubble {
static SkBitmap* mic_full_; // Mic image with full volume.
static SkBitmap* mic_empty_; // Mic image with zero volume.
static SkBitmap* mic_mask_; // Gradient mask used by the volume indicator.
+ static SkBitmap* spinner_; // Spinner image for the progress animation.
+ static const int kRecognizingAnimationStepMs;
};
// This typedef is to workaround the issue with certain versions of