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

Unified Diff: webkit/plugins/npapi/webplugin_impl.cc

Issue 10093011: Show a replacement plug-in for loading errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 8 months 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: webkit/plugins/npapi/webplugin_impl.cc
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index f776559aa1b770a4b3e9f5ca0504edb7219485ba..6c1688dfa81e46741f15771974aca7232e32af9c 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -270,7 +270,15 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
if (!ok) {
LOG(ERROR) << "Couldn't initialize plug-in";
plugin_delegate->PluginDestroyed();
- return false;
+
+ WebKit::WebPlugin* replacement_plugin =
+ page_delegate_->CreatePluginReplacement(file_path_);
+ if (!replacement_plugin->initialize(container)) {
+ LOG(ERROR) << "Couldn't initialize replacement plug-in";
+ return false;
+ }
+ container->setPlugin(replacement_plugin);
+ return true;
}
delegate_ = plugin_delegate;

Powered by Google App Engine
This is Rietveld 408576698