Index: chrome/browser/speech/extension_speech_input_notification_ui.h |
diff --git a/chrome/browser/speech/extension_speech_input_notification_ui.h b/chrome/browser/speech/extension_speech_input_notification_ui.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03b5d81a512715425be59aaa1567e71906750e6a |
--- /dev/null |
+++ b/chrome/browser/speech/extension_speech_input_notification_ui.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_SPEECH_EXTENSION_SPEECH_INPUT_NOTIFICATION_UI_H_ |
+#define CHROME_BROWSER_SPEECH_EXTENSION_SPEECH_INPUT_NOTIFICATION_UI_H_ |
+#pragma once |
+ |
+#include "base/memory/scoped_ptr.h" |
+ |
+class Extension; |
+class Profile; |
+class SkBitmap; |
+class SkCanvas; |
+class StatusIcon; |
+ |
+// Manage the notification UI shown when an extension starts recording audio |
+// for speech recognition. |
+class ExtensionSpeechInputNotificationUI { |
+ public: |
+ explicit ExtensionSpeechInputNotificationUI(Profile* profile); |
+ virtual ~ExtensionSpeechInputNotificationUI(); |
+ |
+ void Show(const Extension* extension, bool show_balloon); |
+ void Hide(); |
+ void SetVUMeterVolume(float volume); |
+ |
+ private: |
+ void DrawVolume(SkCanvas* canvas, const SkBitmap& bitmap, float volume); |
+ void ShowNotificationBalloon(const Extension* extension); |
+ |
+ Profile* profile_; |
+ scoped_ptr<SkBitmap> mic_image_; |
+ scoped_ptr<SkBitmap> buffer_image_; |
+ StatusIcon* tray_icon_; |
+}; |
+ |
+#endif // CHROME_BROWSER_SPEECH_EXTENSION_SPEECH_INPUT_NOTIFICATION_UI_H_ |