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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on Android Created 6 years 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/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_infobar_delegates.cc
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index 789b278c1cc32394dbbb419903460d3a518e9478..ead6040bed8f8beb53926de08f026098cc67de88 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -91,9 +91,10 @@ void OutdatedPluginInfoBarDelegate::Create(
// Copy the name out of |plugin_metadata| now, since the Pass() call below
// will make it impossible to get at.
base::string16 name(plugin_metadata->name());
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new OutdatedPluginInfoBarDelegate(
- installer, plugin_metadata.Pass(), l10n_util::GetStringFUTF16(
+ installer, plugin_metadata.Pass(),
+ l10n_util::GetStringFUTF16(
(installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ?
IDS_PLUGIN_OUTDATED_PROMPT : IDS_PLUGIN_DOWNLOADING,
name)))));
@@ -232,13 +233,13 @@ void PluginInstallerInfoBarDelegate::Create(
return;
}
#endif
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new PluginInstallerInfoBarDelegate(
installer, plugin_metadata.Pass(), callback, true,
l10n_util::GetStringFUTF16(
- (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ?
- IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT :
- IDS_PLUGIN_DOWNLOADING,
+ (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE)
+ ? IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT
+ : IDS_PLUGIN_DOWNLOADING,
name)))));
}
@@ -249,9 +250,10 @@ void PluginInstallerInfoBarDelegate::Replace(
bool new_install,
const base::string16& message) {
DCHECK(infobar->owner());
- infobar->owner()->ReplaceInfoBar(infobar,
- ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
- new PluginInstallerInfoBarDelegate(
+ infobar->owner()->ReplaceInfoBar(
+ infobar,
+ infobar->owner()->CreateConfirmInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(new PluginInstallerInfoBarDelegate(
installer, plugin_metadata.Pass(),
PluginInstallerInfoBarDelegate::InstallCallback(), new_install,
message))));
@@ -365,8 +367,8 @@ void PluginMetroModeInfoBarDelegate::Create(
InfoBarService* infobar_service,
PluginMetroModeInfoBarDelegate::Mode mode,
const base::string16& name) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(
+ infobar_service->AddInfoBar(
+ infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
new PluginMetroModeInfoBarDelegate(mode, name))));
}
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698