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

Unified Diff: chrome/browser/media/protected_media_identifier_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/media/protected_media_identifier_infobar_delegate.cc
diff --git a/chrome/browser/media/protected_media_identifier_infobar_delegate.cc b/chrome/browser/media/protected_media_identifier_infobar_delegate.cc
index daccea1a23c283ad5ee64297a22079dc95a2cce8..1b0277dfd4f436a6d4685c449869f850bad41d2b 100644
--- a/chrome/browser/media/protected_media_identifier_infobar_delegate.cc
+++ b/chrome/browser/media/protected_media_identifier_infobar_delegate.cc
@@ -24,8 +24,10 @@ InfoBar* ProtectedMediaIdentifierInfoBarDelegate::Create(
const PermissionRequestID& id,
const GURL& requesting_frame,
const std::string& display_languages) {
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
const content::NavigationEntry* committed_entry =
- infobar_service->web_contents()->GetController().GetLastCommittedEntry();
+ infobar_service->web_contents->GetController().GetLastCommittedEntry();
return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(
new ProtectedMediaIdentifierInfoBarDelegate(
@@ -62,8 +64,10 @@ bool ProtectedMediaIdentifierInfoBarDelegate::Accept() {
void ProtectedMediaIdentifierInfoBarDelegate::SetPermission(
bool update_content_setting,
bool allowed) {
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
controller_->OnPermissionSet(id_, requesting_frame_,
- web_contents()->GetLastCommittedURL(),
+ web_contents->GetLastCommittedURL(),
update_content_setting, allowed);
}

Powered by Google App Engine
This is Rietveld 408576698