1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_
6 #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h"
21 // Manages the tray icon for speech recognition.
22 class SpeechRecognitionTrayIconController
23 : public base::RefCountedThreadSafe
<SpeechRecognitionTrayIconController
> {
25 SpeechRecognitionTrayIconController();
27 void Show(const string16
& tooltip
, bool show_balloon
);
29 void SetVUMeterVolume(float volume
);
32 friend class base::RefCountedThreadSafe
<SpeechRecognitionTrayIconController
>;
33 virtual ~SpeechRecognitionTrayIconController();
36 void DrawVolume(SkCanvas
* canvas
, const gfx::ImageSkia
& image
, float volume
);
37 void ShowNotificationBalloon(const string16
& text
);
39 scoped_ptr
<SkBitmap
> mic_image_
;
40 scoped_ptr
<SkBitmap
> buffer_image_
;
41 StatusIcon
* tray_icon_
;
44 #endif // CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_