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

Unified Diff: webkit/plugins/ppapi/ppapi_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/ppapi/ppapi_webplugin_impl.cc
diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
index fb0166217f54a830cb8e15b846286d0fc8b7e641..1b6701fb613a686d055b63b357ce12bda287824f 100644
--- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
+++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
@@ -84,7 +84,16 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
if (!success) {
instance_->Delete();
instance_ = NULL;
- return false;
+
+ WebKit::WebPlugin* replacement_plugin =
+ init_data_->delegate->CreatePluginReplacement(
+ init_data_->module->path());
+ if (!replacement_plugin->initialize(container)) {
+ LOG(ERROR) << "Couldn't initialize replacement plug-in";
darin (slow to review) 2012/04/30 18:57:02 do we really need all of these LOG(ERROR) statemen
Bernhard Bauer 2012/04/30 19:30:36 Right; I do want logging if we can't load the actu
+ return false;
+ }
+ container->setPlugin(replacement_plugin);
+ return true;
}
init_data_.reset();

Powered by Google App Engine
This is Rietveld 408576698