| Index: chrome/renderer/plugins/plugin_placeholder.cc
|
| diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc
|
| index c0a09a9c46ffa54350bed72ac1499adce3fdd5ee..595bb98aa846f82e012ddb0f81aae9671e8ae605 100644
|
| --- a/chrome/renderer/plugins/plugin_placeholder.cc
|
| +++ b/chrome/renderer/plugins/plugin_placeholder.cc
|
| @@ -21,6 +21,7 @@
|
| #include "content/public/renderer/render_view.h"
|
| #include "grit/generated_resources.h"
|
| #include "grit/renderer_resources.h"
|
| +#include "grit/webkit_strings.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
|
| @@ -39,6 +40,7 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "webkit/glue/webpreferences.h"
|
| #include "webkit/plugins/npapi/plugin_group.h"
|
| +#include "webkit/plugins/npapi/plugin_list.h"
|
| #include "webkit/plugins/webview_plugin.h"
|
|
|
| using content::RenderThread;
|
| @@ -97,6 +99,28 @@ PluginPlaceholder* PluginPlaceholder::CreateMissingPlugin(
|
| return missing_plugin;
|
| }
|
|
|
| +PluginPlaceholder* PluginPlaceholder::CreateErrorPlugin(
|
| + RenderView* render_view,
|
| + const FilePath& file_path) {
|
| + DictionaryValue values;
|
| + values.SetString("message",
|
| + l10n_util::GetStringUTF8(IDS_PLUGIN_INITIALIZATION_ERROR));
|
| +
|
| + const base::StringPiece template_html(
|
| + ResourceBundle::GetSharedInstance().GetRawDataResource(
|
| + IDR_BLOCKED_PLUGIN_HTML));
|
| + std::string html_data =
|
| + jstemplate_builder::GetI18nTemplateHtml(template_html, &values);
|
| +
|
| + WebPluginParams params;
|
| + // |missing_plugin| will destroy itself when its WebViewPlugin is going away.
|
| + PluginPlaceholder* plugin = new PluginPlaceholder(
|
| + render_view, NULL, params, html_data, params.mimeType);
|
| + plugin->set_allow_loading(true);
|
| +
|
| + return plugin;
|
| +}
|
| +
|
| // static
|
| PluginPlaceholder* PluginPlaceholder::CreateBlockedPlugin(
|
| RenderView* render_view,
|
|
|