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

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 android compilation 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
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..4b3f11c05402fdefa79e52ea962a5ce16fe77de2 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -91,11 +91,13 @@ 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->state() == PluginInstaller::INSTALLER_STATE_IDLE) ?
- IDS_PLUGIN_OUTDATED_PROMPT : IDS_PLUGIN_DOWNLOADING,
+ installer, plugin_metadata.Pass(),
+ l10n_util::GetStringFUTF16(
+ (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE)
+ ? IDS_PLUGIN_OUTDATED_PROMPT
+ : IDS_PLUGIN_DOWNLOADING,
Peter Kasting 2014/12/19 23:06:23 Nit: Don't rewrap ?: linebreaking (2 places)
sdefresne 2014/12/20 11:30:55 Sorry, I reformatted everything with clang-format
name)))));
}
@@ -232,13 +234,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 +251,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 +368,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))));
}

Powered by Google App Engine
This is Rietveld 408576698