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

Unified Diff: chrome/browser/geolocation/geolocation_infobar_delegate.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/geolocation/geolocation_infobar_delegate.cc
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate.cc b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
index d910433285e70098baaa6b28145ab1ca547effbc..9310063512317f0a113fcecb6172025beef04c05 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
@@ -113,9 +113,11 @@ bool GeolocationInfoBarDelegate::Accept() {
void GeolocationInfoBarDelegate::SetPermission(bool update_content_setting,
bool allowed) {
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
controller_->OnPermissionSet(
id_, requesting_frame_,
- web_contents()->GetLastCommittedURL().GetOrigin(),
+ web_contents->GetLastCommittedURL().GetOrigin(),
update_content_setting, allowed);
}
@@ -175,7 +177,9 @@ bool GeolocationInfoBarDelegate::LinkClicked(
"https://www.google.com/support/chrome/bin/answer.py?answer=142065";
#endif
- web_contents()->OpenURL(content::OpenURLParams(
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ web_contents->OpenURL(content::OpenURLParams(
google_util::AppendGoogleLocaleParam(GURL(kGeolocationLearnMoreUrl)),
content::Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,

Powered by Google App Engine
This is Rietveld 408576698