| Index: chrome/browser/plugin_infobar_delegates.cc
|
| diff --git a/chrome/browser/plugin_infobar_delegates.cc b/chrome/browser/plugin_infobar_delegates.cc
|
| index fba356a9ba332282a2437e068eda09803607a924..211d970176757c30e33cd3689548049b159c3c26 100644
|
| --- a/chrome/browser/plugin_infobar_delegates.cc
|
| +++ b/chrome/browser/plugin_infobar_delegates.cc
|
| @@ -52,13 +52,16 @@ bool PluginInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
|
| (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
|
| content::PAGE_TRANSITION_LINK,
|
| false);
|
| - owner()->web_contents()->OpenURL(params);
|
| + owner()->GetWebContents()->OpenURL(params);
|
| return false;
|
| }
|
|
|
| void PluginInfoBarDelegate::LoadBlockedPlugins() {
|
| - owner()->Send(
|
| - new ChromeViewMsg_LoadBlockedPlugins(owner()->routing_id(), identifier_));
|
| + content::WebContents* web_contents = owner()->GetWebContents();
|
| + if (web_contents) {
|
| + web_contents->Send(new ChromeViewMsg_LoadBlockedPlugins(
|
| + web_contents->GetRoutingID(), identifier_));
|
| + }
|
| }
|
|
|
| gfx::Image* PluginInfoBarDelegate::GetIcon() const {
|
| @@ -126,8 +129,8 @@ bool UnauthorizedPluginInfoBarDelegate::Accept() {
|
| bool UnauthorizedPluginInfoBarDelegate::Cancel() {
|
| content::RecordAction(
|
| UserMetricsAction("BlockedPluginInfobar.AlwaysAllow"));
|
| - content_settings_->AddExceptionForURL(owner()->web_contents()->GetURL(),
|
| - owner()->web_contents()->GetURL(),
|
| + content_settings_->AddExceptionForURL(owner()->GetWebContents()->GetURL(),
|
| + owner()->GetWebContents()->GetURL(),
|
| CONTENT_SETTINGS_TYPE_PLUGINS,
|
| std::string(),
|
| CONTENT_SETTING_ALLOW);
|
| @@ -226,7 +229,7 @@ bool OutdatedPluginInfoBarDelegate::Accept() {
|
| return false;
|
| }
|
|
|
| - content::WebContents* web_contents = owner()->web_contents();
|
| + content::WebContents* web_contents = owner()->GetWebContents();
|
| if (installer()->url_for_display()) {
|
| installer()->OpenDownloadURL(web_contents);
|
| } else {
|
| @@ -290,7 +293,8 @@ void OutdatedPluginInfoBarDelegate::ReplaceWithInfoBar(
|
| if (!owner())
|
| return;
|
| InfoBarDelegate* delegate = new PluginInstallerInfoBarDelegate(
|
| - owner(), installer(), base::Closure(), false, message);
|
| + static_cast<InfoBarTabHelper*>(owner()),
|
| + installer(), base::Closure(), false, message);
|
| owner()->ReplaceInfoBar(this, delegate);
|
| }
|
|
|
| @@ -373,7 +377,7 @@ bool PluginInstallerInfoBarDelegate::LinkClicked(
|
| url, Referrer(),
|
| (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
|
| content::PAGE_TRANSITION_LINK, false);
|
| - owner()->web_contents()->OpenURL(params);
|
| + owner()->GetWebContents()->OpenURL(params);
|
| return false;
|
| }
|
|
|
| @@ -414,7 +418,8 @@ void PluginInstallerInfoBarDelegate::ReplaceWithInfoBar(
|
| if (!owner())
|
| return;
|
| InfoBarDelegate* delegate = new PluginInstallerInfoBarDelegate(
|
| - owner(), installer(), base::Closure(), new_install_, message);
|
| + static_cast<InfoBarTabHelper*>(owner()),
|
| + installer(), base::Closure(), new_install_, message);
|
| owner()->ReplaceInfoBar(this, delegate);
|
| }
|
|
|
| @@ -457,7 +462,7 @@ string16 PluginMetroModeInfoBarDelegate::GetButtonLabel(
|
| }
|
|
|
| bool PluginMetroModeInfoBarDelegate::Accept() {
|
| - content::WebContents* web_contents = owner()->web_contents();
|
| + content::WebContents* web_contents = owner()->GetWebContents();
|
| if (!web_contents)
|
| return false;
|
| // Note that empty urls are not valid.
|
| @@ -485,7 +490,7 @@ bool PluginMetroModeInfoBarDelegate::LinkClicked(
|
| url, Referrer(),
|
| (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
|
| content::PAGE_TRANSITION_LINK, false);
|
| - owner()->web_contents()->OpenURL(params);
|
| + owner()->GetWebContents()->OpenURL(params);
|
| return false;
|
| }
|
| #endif // defined(OS_WIN)
|
|
|