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

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: fix compile 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
« no previous file with comments | « chrome/browser/ssl/ssl_tab_helper.cc ('k') | chrome/browser/translate/options_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..545bd28ca88436b62d3d04f763edcc61d703ca41 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,12 +142,12 @@ base::string16 ThreeDAPIInfoBarDelegate::GetLinkText() const {
}
bool ThreeDAPIInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- web_contents()->OpenURL(content::OpenURLParams(
- GURL("https://support.google.com/chrome/?p=ib_webgl"),
- content::Referrer(),
- (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
- content::PAGE_TRANSITION_LINK,
- false));
+ InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
+ content::OpenURLParams(
+ GURL("https://support.google.com/chrome/?p=ib_webgl"),
+ content::Referrer(),
+ (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
+ content::PAGE_TRANSITION_LINK, false));
return false;
}
« no previous file with comments | « chrome/browser/ssl/ssl_tab_helper.cc ('k') | chrome/browser/translate/options_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698