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

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

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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) 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void SpeechInputBubbleGtk::OnCancelClicked(GtkWidget* widget) { 105 void SpeechInputBubbleGtk::OnCancelClicked(GtkWidget* widget) {
106 delegate_->InfoBubbleButtonClicked(BUTTON_CANCEL); 106 delegate_->InfoBubbleButtonClicked(BUTTON_CANCEL);
107 } 107 }
108 108
109 void SpeechInputBubbleGtk::OnTryAgainClicked(GtkWidget* widget) { 109 void SpeechInputBubbleGtk::OnTryAgainClicked(GtkWidget* widget) {
110 delegate_->InfoBubbleButtonClicked(BUTTON_TRY_AGAIN); 110 delegate_->InfoBubbleButtonClicked(BUTTON_TRY_AGAIN);
111 } 111 }
112 112
113 void SpeechInputBubbleGtk::OnMicSettingsClicked(GtkWidget* widget) { 113 void SpeechInputBubbleGtk::OnMicSettingsClicked(GtkWidget* widget) {
114 speech_input::SpeechInputManager::ShowAudioInputSettingsFromUI( 114 speech_input::SpeechInputManager::ShowAudioInputSettingsFromUI(
115 &web_contents()->GetBrowserContext()->GetResourceContext()); 115 web_contents()->GetBrowserContext()->GetResourceContext());
116 Hide(); 116 Hide();
117 } 117 }
118 118
119 void SpeechInputBubbleGtk::Show() { 119 void SpeechInputBubbleGtk::Show() {
120 if (bubble_) 120 if (bubble_)
121 return; // Nothing further to do since the bubble is already visible. 121 return; // Nothing further to do since the bubble is already visible.
122 122
123 // We use a vbox to arrange the controls (label, image, button bar) vertically 123 // We use a vbox to arrange the controls (label, image, button bar) vertically
124 // and the button bar is a hbox holding the 2 buttons (try again and cancel). 124 // and the button bar is a hbox holding the 2 buttons (try again and cancel).
125 // To get horizontal space around them we place this vbox with padding in a 125 // To get horizontal space around them we place this vbox with padding in a
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 } // namespace 295 } // namespace
296 296
297 SpeechInputBubble* SpeechInputBubble::CreateNativeBubble( 297 SpeechInputBubble* SpeechInputBubble::CreateNativeBubble(
298 WebContents* web_contents, 298 WebContents* web_contents,
299 Delegate* delegate, 299 Delegate* delegate,
300 const gfx::Rect& element_rect) { 300 const gfx::Rect& element_rect) {
301 return new SpeechInputBubbleGtk(web_contents, delegate, element_rect); 301 return new SpeechInputBubbleGtk(web_contents, delegate, element_rect);
302 } 302 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698