Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2131)

Unified Diff: chrome/browser/speech/speech_input_extension_notification_ui.h

Issue 8386074: Add a tray notification UI for speech input recording in the extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: requested file renames and api constants refactor. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/speech/speech_input_extension_notification_ui.h
diff --git a/chrome/browser/speech/speech_input_extension_notification_ui.h b/chrome/browser/speech/speech_input_extension_notification_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..aad9999fec02e6aee5dfc259a4f09de0ae5f2ab6
--- /dev/null
+++ b/chrome/browser/speech/speech_input_extension_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_SPEECH_INPUT_EXTENSION_NOTIFICATION_UI_H_
+#define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_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
Satish 2011/11/07 18:16:31 Manage -> Manages
Leandro Graciá Gil 2011/11/07 19:34:42 Done.
+// for speech recognition.
+class SpeechInputExtensionNotificationUI {
Satish 2011/11/07 18:16:31 could drop the 'UI' from name?
Leandro Graciá Gil 2011/11/07 19:34:42 Done.
+ public:
+ explicit SpeechInputExtensionNotificationUI(Profile* profile);
+ virtual ~SpeechInputExtensionNotificationUI();
+
+ 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_SPEECH_INPUT_EXTENSION_NOTIFICATION_UI_H_

Powered by Google App Engine
This is Rietveld 408576698