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

Unified Diff: chrome/browser/three_d_api_observer.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/three_d_api_observer.cc
diff --git a/chrome/browser/three_d_api_observer.cc b/chrome/browser/three_d_api_observer.cc
index 94d3b38a44e4c5db3fb5ac2731221ca0b2c5381c..bb98dec57469109c76824820ae6ca5a71d7c46c3 100644
--- a/chrome/browser/three_d_api_observer.cc
+++ b/chrome/browser/three_d_api_observer.cc
@@ -132,7 +132,8 @@ bool ThreeDAPIInfoBarDelegate::Cancel() {
UMA_HISTOGRAM_ENUMERATION("GPU.ThreeDAPIInfoBarDismissal", RELOADED,
DISMISSAL_MAX);
content::GpuDataManager::GetInstance()->UnblockDomainFrom3DAPIs(url_);
- web_contents()->GetController().Reload(true);
+ InfoBarService::WebContentsFromInfoBar(infobar())->GetController().Reload(
+ true);
return true;
}
@@ -141,7 +142,9 @@ base::string16 ThreeDAPIInfoBarDelegate::GetLinkText() const {
}
bool ThreeDAPIInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- web_contents()->OpenURL(content::OpenURLParams(
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ web_contents->OpenURL(content::OpenURLParams(
GURL("https://support.google.com/chrome/?p=ib_webgl"),
content::Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,

Powered by Google App Engine
This is Rietveld 408576698