| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_NOTIFICATION_H_ | |
| 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_NOTIFICATION_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 | |
| 11 class Extension; | |
| 12 class Profile; | |
| 13 class SkBitmap; | |
| 14 class SkCanvas; | |
| 15 class StatusIcon; | |
| 16 | |
| 17 // Manages the notification UI shown when an extension starts recording audio | |
| 18 // for speech recognition. | |
| 19 class SpeechInputExtensionNotification { | |
| 20 public: | |
| 21 explicit SpeechInputExtensionNotification(Profile* profile); | |
| 22 virtual ~SpeechInputExtensionNotification(); | |
| 23 | |
| 24 void Show(const Extension* extension, bool show_balloon); | |
| 25 void Hide(); | |
| 26 void SetVUMeterVolume(float volume); | |
| 27 | |
| 28 private: | |
| 29 void DrawVolume(SkCanvas* canvas, const SkBitmap& bitmap, float volume); | |
| 30 void ShowNotificationBalloon(const Extension* extension); | |
| 31 | |
| 32 Profile* profile_; | |
| 33 scoped_ptr<SkBitmap> mic_image_; | |
| 34 scoped_ptr<SkBitmap> buffer_image_; | |
| 35 StatusIcon* tray_icon_; | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_NOTIFICATION_H_ | |
| OLD | NEW |