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

Side by Side Diff: chrome/browser/speech/speech_input_bubble_gtk.cc

Issue 7741043: Hiding the Speech Input bubble when clicking Microphone Settings on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/speech/speech_input_bubble.h" 5 #include "chrome/browser/speech/speech_input_bubble.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" 10 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void SpeechInputBubbleGtk::OnCancelClicked(GtkWidget* widget) { 100 void SpeechInputBubbleGtk::OnCancelClicked(GtkWidget* widget) {
101 delegate_->InfoBubbleButtonClicked(BUTTON_CANCEL); 101 delegate_->InfoBubbleButtonClicked(BUTTON_CANCEL);
102 } 102 }
103 103
104 void SpeechInputBubbleGtk::OnTryAgainClicked(GtkWidget* widget) { 104 void SpeechInputBubbleGtk::OnTryAgainClicked(GtkWidget* widget) {
105 delegate_->InfoBubbleButtonClicked(BUTTON_TRY_AGAIN); 105 delegate_->InfoBubbleButtonClicked(BUTTON_TRY_AGAIN);
106 } 106 }
107 107
108 void SpeechInputBubbleGtk::OnMicSettingsClicked(GtkWidget* widget) { 108 void SpeechInputBubbleGtk::OnMicSettingsClicked(GtkWidget* widget) {
109 AudioManager::GetAudioManager()->ShowAudioInputSettings(); 109 AudioManager::GetAudioManager()->ShowAudioInputSettings();
110 Hide();
110 } 111 }
111 112
112 void SpeechInputBubbleGtk::Show() { 113 void SpeechInputBubbleGtk::Show() {
113 if (bubble_) 114 if (bubble_)
114 return; // Nothing further to do since the bubble is already visible. 115 return; // Nothing further to do since the bubble is already visible.
115 116
116 // We use a vbox to arrange the controls (label, image, button bar) vertically 117 // We use a vbox to arrange the controls (label, image, button bar) vertically
117 // and the button bar is a hbox holding the 2 buttons (try again and cancel). 118 // and the button bar is a hbox holding the 2 buttons (try again and cancel).
118 // To get horizontal space around them we place this vbox with padding in a 119 // To get horizontal space around them we place this vbox with padding in a
119 // GtkAlignment below. 120 // GtkAlignment below.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 282 }
282 283
283 } // namespace 284 } // namespace
284 285
285 SpeechInputBubble* SpeechInputBubble::CreateNativeBubble( 286 SpeechInputBubble* SpeechInputBubble::CreateNativeBubble(
286 TabContents* tab_contents, 287 TabContents* tab_contents,
287 Delegate* delegate, 288 Delegate* delegate,
288 const gfx::Rect& element_rect) { 289 const gfx::Rect& element_rect) {
289 return new SpeechInputBubbleGtk(tab_contents, delegate, element_rect); 290 return new SpeechInputBubbleGtk(tab_contents, delegate, element_rect);
290 } 291 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698