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

Side by Side Diff: chrome/browser/speech/speech_input_extension_notification.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: creating the notification object dynamically on first use. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/speech/speech_input_extension_manager.cc ('k') | chrome/browser/speech/speech_input_extension_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698