Chromium Code Reviews| Index: chrome/browser/speech/speech_input_bubble.h |
| diff --git a/chrome/browser/speech/speech_input_bubble.h b/chrome/browser/speech/speech_input_bubble.h |
| index dd5d21b463d86dc200dff533de3c68b2c5c09e6e..2d3e75374b0af876264996d1768f7fbf3d9602ee 100644 |
| --- a/chrome/browser/speech/speech_input_bubble.h |
| +++ b/chrome/browser/speech/speech_input_bubble.h |
| @@ -13,9 +13,11 @@ |
| #include "base/task.h" |
| namespace gfx { |
| +class Canvas; |
| class Rect; |
| } |
| class SkBitmap; |
| +class SkCanvas; |
| class TabContents; |
| // SpeechInputBubble displays a popup info bubble during speech recognition, |
| @@ -97,7 +99,7 @@ class SpeechInputBubble { |
| virtual void Hide() = 0; |
| // Updates the current captured audio volume displayed on screen. |
|
bulach
2011/03/01 17:39:04
perhaps "Updates and draws the current..."
|
| - virtual void SetInputVolume(float volume) = 0; |
| + virtual void SetInputVolume(float volume, float noise_volume) = 0; |
| // Returns the TabContents for which this bubble gets displayed. |
| virtual TabContents* tab_contents() = 0; |
| @@ -129,7 +131,7 @@ class SpeechInputBubbleBase : public SpeechInputBubble { |
| virtual void SetRecordingMode(); |
| virtual void SetRecognizingMode(); |
| virtual void SetMessage(const string16& text); |
| - virtual void SetInputVolume(float volume); |
| + virtual void SetInputVolume(float volume, float noise_volume); |
| virtual TabContents* tab_contents(); |
| protected: |
| @@ -152,6 +154,8 @@ class SpeechInputBubbleBase : public SpeechInputBubble { |
| private: |
| void DoRecognizingAnimationStep(); |
| + void DrawVolumeOverlay(SkCanvas& canvas, SkBitmap* bitmap, float volume); |
|
hans
2011/03/01 17:25:25
nit: spontaneously, i would have made |bitmap| a c
bulach
2011/03/01 17:39:04
either SkCanvas* or const SkCanvas&
|
| + |
| // Task factory used for animation timer. |
| ScopedRunnableMethodFactory<SpeechInputBubbleBase> task_factory_; |
| int animation_step_; // Current index/step of the animation. |
| @@ -167,6 +171,7 @@ class SpeechInputBubbleBase : public SpeechInputBubble { |
| TabContents* tab_contents_; |
| static SkBitmap* mic_full_; // Mic image with full volume. |
| + static SkBitmap* mic_noise_; // Mic image with full noise 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. |