Revert 168224 - Update V8 to version 3.15.4.
[chromium-blink-merge.git] / chrome / browser / speech / speech_recognition_tray_icon_controller.h
blob5840186e216743d11a6f852449d3ca04ccb7fb25
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"
12 class Extension;
13 class SkBitmap;
14 class SkCanvas;
15 class StatusIcon;
17 namespace gfx {
18 class ImageSkia;
21 // Manages the tray icon for speech recognition.
22 class SpeechRecognitionTrayIconController
23 : public base::RefCountedThreadSafe<SpeechRecognitionTrayIconController> {
24 public:
25 SpeechRecognitionTrayIconController();
27 void Show(const string16& tooltip, bool show_balloon);
28 void Hide();
29 void SetVUMeterVolume(float volume);
31 private:
32 friend class base::RefCountedThreadSafe<SpeechRecognitionTrayIconController>;
33 virtual ~SpeechRecognitionTrayIconController();
35 void Initialize();
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_