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

Unified Diff: content/browser/plugin_service.cc

Issue 7670003: Wire experimental Flapper part two (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/common/pepper_plugin_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_service.cc
===================================================================
--- content/browser/plugin_service.cc (revision 96718)
+++ content/browser/plugin_service.cc (working copy)
@@ -492,7 +492,22 @@
break;
}
}
- return info;
+ if (info)
+ return info;
+ // We did not find the plugin in our list. But wait! the plugin can also
+ // be a latecomer, as it happens with pepper flash. This information
+ // can be obtained from the PluginList singleton and we can use it to
+ // construct it and add it to the list. This same deal needs to be done
+ // in the renderer side in PepperPluginRegistry.
+ webkit::WebPluginInfo webplugin_info;
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
+ plugin_path, &webplugin_info))
+ return NULL;
+ PepperPluginInfo new_pepper_info;
+ if (!MakePepperPluginInfo(webplugin_info, &new_pepper_info))
+ return NULL;
+ ppapi_plugins_.push_back(new_pepper_info);
+ return &ppapi_plugins_[ppapi_plugins_.size() - 1];
}
#if defined(OS_POSIX) && !defined(OS_MACOSX)
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/common/pepper_plugin_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698