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

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

Issue 6115001: Listen for tab close notifications and cancel active speech sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/speech/speech_input_bubble.h
diff --git a/chrome/browser/speech/speech_input_bubble.h b/chrome/browser/speech/speech_input_bubble.h
index 3faabe091b97bfa0566a270a4c6da8d27d71d028..073333391df77e85217c14115db7b9b6b01f7e8f 100644
--- a/chrome/browser/speech/speech_input_bubble.h
+++ b/chrome/browser/speech/speech_input_bubble.h
@@ -99,6 +99,9 @@ class SpeechInputBubble {
// Updates the current captured audio volume displayed on screen.
virtual void SetInputVolume(float volume) = 0;
+ // Returns the TabContents for which this bubble gets displayed.
+ virtual TabContents* tab_contents() = 0;
+
// The horizontal distance between the start of the html widget and the speech
// bubble's arrow.
static const int kBubbleTargetOffsetX;
@@ -119,7 +122,7 @@ class SpeechInputBubbleBase : public SpeechInputBubble {
DISPLAY_MODE_MESSAGE
};
- SpeechInputBubbleBase();
+ SpeechInputBubbleBase(TabContents* tab_contents);
bulach 2011/01/06 12:32:39 explicit
virtual ~SpeechInputBubbleBase();
// SpeechInputBubble methods
@@ -127,6 +130,7 @@ class SpeechInputBubbleBase : public SpeechInputBubble {
virtual void SetRecognizingMode();
virtual void SetMessage(const string16& text);
virtual void SetInputVolume(float volume);
+ virtual TabContents* tab_contents() { return tab_contents_; }
protected:
// Updates the platform specific UI layout for the current display mode.
@@ -159,6 +163,8 @@ class SpeechInputBubbleBase : public SpeechInputBubble {
scoped_ptr<SkBitmap> mic_image_;
// A temporary buffer image used in creating the above mic image.
scoped_ptr<SkBitmap> buffer_image_;
+ // TabContents in which this this bubble gets displayed.
+ TabContents* tab_contents_;
static SkBitmap* mic_full_; // Mic image with full volume.
static SkBitmap* mic_empty_; // Mic image with zero volume.
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_bubble.cc » ('j') | chrome/browser/speech/speech_input_bubble_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698