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

Unified Diff: chrome/browser/speech/speech_input_bubble_mac.mm

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_mac.mm
diff --git a/chrome/browser/speech/speech_input_bubble_mac.mm b/chrome/browser/speech/speech_input_bubble_mac.mm
index d4a54f2e2a9a806f0e23883644c15383b63a07e9..912370ebad8b92f165f8519076ba60ce161f1c9f 100644
--- a/chrome/browser/speech/speech_input_bubble_mac.mm
+++ b/chrome/browser/speech/speech_input_bubble_mac.mm
@@ -30,7 +30,6 @@ class SpeechInputBubbleImpl : public SpeechInputBubbleBase {
private:
scoped_nsobject<SpeechInputWindowController> window_;
- TabContents* tab_contents_;
Delegate* delegate_;
gfx::Rect element_rect_;
};
@@ -38,7 +37,7 @@ class SpeechInputBubbleImpl : public SpeechInputBubbleBase {
SpeechInputBubbleImpl::SpeechInputBubbleImpl(TabContents* tab_contents,
Delegate* delegate,
const gfx::Rect& element_rect)
- : tab_contents_(tab_contents),
+ : SpeechInputBubbleBase(tab_contents),
delegate_(delegate),
element_rect_(element_rect) {
}
@@ -62,7 +61,7 @@ void SpeechInputBubbleImpl::Show() {
// Find the screen coordinates for the given tab and position the bubble's
// arrow anchor point inside that to point at the bottom-left of the html
// input element rect.
- gfx::NativeView view = tab_contents_->view()->GetNativeView();
+ gfx::NativeView view = tab_contents()->view()->GetNativeView();
NSRect tab_bounds = [view bounds];
NSPoint anchor = NSMakePoint(
tab_bounds.origin.x + element_rect_.x() + kBubbleTargetOffsetX,
@@ -72,7 +71,7 @@ void SpeechInputBubbleImpl::Show() {
anchor = [[view window] convertBaseToScreen:anchor];
window_.reset([[SpeechInputWindowController alloc]
- initWithParentWindow:tab_contents_->view()->GetTopLevelNativeWindow()
+ initWithParentWindow:tab_contents()->view()->GetTopLevelNativeWindow()
delegate:delegate_
anchoredAt:anchor]);
« no previous file with comments | « chrome/browser/speech/speech_input_bubble_gtk.cc ('k') | chrome/browser/speech/speech_input_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698