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

Side by Side Diff: chrome/browser/speech/speech_recognition_tray_icon_controller.h

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_
6 #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_ 6 #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 12
13 class Extension; 13 class Extension;
14 class SkBitmap; 14 class SkBitmap;
15 class SkCanvas; 15 class SkCanvas;
16 class StatusIcon; 16 class StatusIcon;
17 17
18 namespace gfx {
19 class ImageSkia;
20 }
21
18 // Manages the tray icon for speech recognition. 22 // Manages the tray icon for speech recognition.
19 class SpeechRecognitionTrayIconController 23 class SpeechRecognitionTrayIconController
20 : public base::RefCountedThreadSafe<SpeechRecognitionTrayIconController> { 24 : public base::RefCountedThreadSafe<SpeechRecognitionTrayIconController> {
21 public: 25 public:
22 SpeechRecognitionTrayIconController(); 26 SpeechRecognitionTrayIconController();
23 27
24 void Show(const string16& tooltip, bool show_balloon); 28 void Show(const string16& tooltip, bool show_balloon);
25 void Hide(); 29 void Hide();
26 void SetVUMeterVolume(float volume); 30 void SetVUMeterVolume(float volume);
27 31
28 private: 32 private:
29 friend class base::RefCountedThreadSafe<SpeechRecognitionTrayIconController>; 33 friend class base::RefCountedThreadSafe<SpeechRecognitionTrayIconController>;
30 virtual ~SpeechRecognitionTrayIconController(); 34 virtual ~SpeechRecognitionTrayIconController();
31 35
32 void Initialize(); 36 void Initialize();
33 void DrawVolume(SkCanvas* canvas, const SkBitmap& bitmap, float volume); 37 void DrawVolume(SkCanvas* canvas, const gfx::ImageSkia& image, float volume);
34 void ShowNotificationBalloon(const string16& text); 38 void ShowNotificationBalloon(const string16& text);
35 39
36 scoped_ptr<SkBitmap> mic_image_; 40 scoped_ptr<SkBitmap> mic_image_;
37 scoped_ptr<SkBitmap> buffer_image_; 41 scoped_ptr<SkBitmap> buffer_image_;
38 StatusIcon* tray_icon_; 42 StatusIcon* tray_icon_;
39 }; 43 };
40 44
41 #endif // CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_ 45 #endif // CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_TRAY_ICON_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698