diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 15:57:17 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 15:57:17 +0000 |
commit | 70a09025ee676c9578ba490c52850386e67dc774 (patch) | |
tree | 313073ded7c026628973f9ea15663e4cf295a974 | |
parent | 93473908574140b04150a159a09b243be3dd0bfe (diff) | |
download | chromium_src-70a09025ee676c9578ba490c52850386e67dc774.zip chromium_src-70a09025ee676c9578ba490c52850386e67dc774.tar.gz chromium_src-70a09025ee676c9578ba490c52850386e67dc774.tar.bz2 |
speech: Do not use unix_hacker style for virtual methods.
This patch renames SpeechInputBubble::web_contents() to GetWebContents().
R=satish@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9594034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125392 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 14 insertions, 13 deletions
diff --git a/chrome/browser/speech/speech_recognition_bubble.cc b/chrome/browser/speech/speech_recognition_bubble.cc index d3f4013..c12872b 100644 --- a/chrome/browser/speech/speech_recognition_bubble.cc +++ b/chrome/browser/speech/speech_recognition_bubble.cc @@ -237,7 +237,7 @@ void SpeechRecognitionBubbleBase::SetInputVolume(float volume, SetImage(*mic_image_.get()); } -WebContents* SpeechRecognitionBubbleBase::web_contents() { +WebContents* SpeechRecognitionBubbleBase::GetWebContents() { return web_contents_; } diff --git a/chrome/browser/speech/speech_recognition_bubble.h b/chrome/browser/speech/speech_recognition_bubble.h index f3fef09..2844122 100644 --- a/chrome/browser/speech/speech_recognition_bubble.h +++ b/chrome/browser/speech/speech_recognition_bubble.h @@ -111,7 +111,7 @@ class SpeechRecognitionBubble { virtual void SetInputVolume(float volume, float noise_volume) = 0; // Returns the WebContents for which this bubble gets displayed. - virtual content::WebContents* web_contents() = 0; + virtual content::WebContents* GetWebContents() = 0; // The horizontal distance between the start of the html widget and the speech // bubble's arrow. @@ -143,7 +143,7 @@ class SpeechRecognitionBubbleBase : public SpeechRecognitionBubble { virtual void SetRecognizingMode() OVERRIDE; virtual void SetMessage(const string16& text) OVERRIDE; virtual void SetInputVolume(float volume, float noise_volume) OVERRIDE; - virtual content::WebContents* web_contents() OVERRIDE; + virtual content::WebContents* GetWebContents() OVERRIDE; protected: // Updates the platform specific UI layout for the current display mode. diff --git a/chrome/browser/speech/speech_recognition_bubble_controller.cc b/chrome/browser/speech/speech_recognition_bubble_controller.cc index 656738f..2f275ef 100644 --- a/chrome/browser/speech/speech_recognition_bubble_controller.cc +++ b/chrome/browser/speech/speech_recognition_bubble_controller.cc @@ -102,10 +102,10 @@ void SpeechRecognitionBubbleController::UpdateTabContentsSubscription( // If there are any other bubbles existing for the same TabContents, we would // have subscribed to tab close notifications on their behalf and we need to // stay registered. So we don't change the subscription in such cases. - WebContents* web_contents = bubbles_[caller_id]->web_contents(); + WebContents* web_contents = bubbles_[caller_id]->GetWebContents(); for (BubbleCallerIdMap::iterator iter = bubbles_.begin(); iter != bubbles_.end(); ++iter) { - if (iter->second->web_contents() == web_contents && + if (iter->second->GetWebContents() == web_contents && iter->first != caller_id) { // At least one other bubble exists for the same TabContents. So don't // make any change to the subscription. @@ -131,7 +131,7 @@ void SpeechRecognitionBubbleController::Observe( WebContents* web_contents = content::Source<WebContents>(source).ptr(); BubbleCallerIdMap::iterator iter = bubbles_.begin(); while (iter != bubbles_.end()) { - if (iter->second->web_contents() == web_contents) { + if (iter->second->GetWebContents() == web_contents) { BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind( &SpeechRecognitionBubbleController::InvokeDelegateButtonClicked, diff --git a/chrome/browser/speech/speech_recognition_bubble_gtk.cc b/chrome/browser/speech/speech_recognition_bubble_gtk.cc index 816aa73..abf788f 100644 --- a/chrome/browser/speech/speech_recognition_bubble_gtk.cc +++ b/chrome/browser/speech/speech_recognition_bubble_gtk.cc @@ -137,7 +137,7 @@ void SpeechRecognitionBubbleGtk::Show() { kBubbleControlVerticalSpacing); Profile* profile = Profile::FromBrowserContext( - web_contents()->GetBrowserContext()); + GetWebContents()->GetBrowserContext()); // TODO(tommi): The audio_manager property can only be accessed from the // IO thread, so we can't call CanShowAudioInputSettings directly here if @@ -175,9 +175,9 @@ void SpeechRecognitionBubbleGtk::Show() { gtk_container_add(GTK_CONTAINER(content), vbox); ThemeServiceGtk* theme_provider = ThemeServiceGtk::GetFrom(profile); - GtkWidget* reference_widget = web_contents()->GetNativeView(); + GtkWidget* reference_widget = GetWebContents()->GetNativeView(); gfx::Rect container_rect; - web_contents()->GetContainerBounds(&container_rect); + GetWebContents()->GetContainerBounds(&container_rect); gfx::Rect target_rect(element_rect_.right() - kBubbleTargetOffsetX, element_rect_.bottom(), 1, 1); diff --git a/chrome/browser/speech/speech_recognition_bubble_mac.mm b/chrome/browser/speech/speech_recognition_bubble_mac.mm index d8a7cbc..8321fd9 100644 --- a/chrome/browser/speech/speech_recognition_bubble_mac.mm +++ b/chrome/browser/speech/speech_recognition_bubble_mac.mm @@ -69,8 +69,9 @@ void SpeechRecognitionBubbleImpl::Show() { // arrow anchor point inside that to point at the bottom-left of the html // input element rect if the position is valid, otherwise point it towards // the page icon in the omnibox. - gfx::NativeView view = web_contents()->GetView()->GetNativeView(); - NSWindow* parentWindow = web_contents()->GetView()->GetTopLevelNativeWindow(); + gfx::NativeView view = GetWebContents()->GetView()->GetNativeView(); + NSWindow* parentWindow = + GetWebContents()->GetView()->GetTopLevelNativeWindow(); NSRect tab_bounds = [view bounds]; int anchor_x = tab_bounds.origin.x + element_rect_.x() + element_rect_.width() - kBubbleTargetOffsetX; diff --git a/chrome/browser/speech/speech_recognition_bubble_views.cc b/chrome/browser/speech/speech_recognition_bubble_views.cc index cb27738..30a0c17 100644 --- a/chrome/browser/speech/speech_recognition_bubble_views.cc +++ b/chrome/browser/speech/speech_recognition_bubble_views.cc @@ -360,12 +360,12 @@ void SpeechRecognitionBubbleImpl::Show() { if (!bubble_) { // Anchor to the location icon view, in case |element_rect| is offscreen. Browser* browser = Browser::GetOrCreateTabbedBrowser( - Profile::FromBrowserContext(web_contents()->GetBrowserContext())); + Profile::FromBrowserContext(GetWebContents()->GetBrowserContext())); BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); views::View* icon = browser_view->GetLocationBarView() ? browser_view->GetLocationBarView()->location_icon_view() : NULL; bubble_ = new SpeechRecognitionBubbleView(delegate_, icon, element_rect_, - web_contents()); + GetWebContents()); browser::CreateViewsBubble(bubble_); UpdateLayout(); } |