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

Unified Diff: chrome/renderer/plugins/plugin_placeholder.cc

Issue 11414010: Add placeholder text for unsupported plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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/renderer/plugins/plugin_placeholder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc
index 07a0c8ba52255efbd20721d4a220759b3953a932..9e4fb1acf5f3cb945f2ab8db6829209a10cbab73 100644
--- a/chrome/renderer/plugins/plugin_placeholder.cc
+++ b/chrome/renderer/plugins/plugin_placeholder.cc
@@ -109,7 +109,12 @@ PluginPlaceholder* PluginPlaceholder::CreateMissingPlugin(
IDR_BLOCKED_PLUGIN_HTML));
DictionaryValue values;
+#if defined(ENABLE_PLUGIN_INSTALLATION)
values.SetString("message", l10n_util::GetStringUTF8(IDS_PLUGIN_SEARCHING));
+#else
+ values.SetString("message",
+ l10n_util::GetStringUTF8(IDS_PLUGIN_NOT_SUPPORTED));
+#endif
std::string html_data =
jstemplate_builder::GetI18nTemplateHtml(template_html, &values);
@@ -122,8 +127,6 @@ PluginPlaceholder* PluginPlaceholder::CreateMissingPlugin(
RenderThread::Get()->Send(new ChromeViewHostMsg_FindMissingPlugin(
missing_plugin->routing_id(), missing_plugin->CreateRoutingId(),
params.mimeType.utf8()));
-#else
- missing_plugin->OnDidNotFindMissingPlugin();
#endif
return missing_plugin;
}
@@ -407,11 +410,11 @@ void PluginPlaceholder::WillDestroyPlugin() {
delete this;
}
+#if defined(ENABLE_PLUGIN_INSTALLATION)
void PluginPlaceholder::OnDidNotFindMissingPlugin() {
SetMessage(l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_FOUND));
}
-#if defined(ENABLE_PLUGIN_INSTALLATION)
void PluginPlaceholder::OnFoundMissingPlugin(const string16& plugin_name) {
if (status_->value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound)
SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_FOUND, plugin_name));
« no previous file with comments | « chrome/renderer/plugins/plugin_placeholder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698