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

Unified Diff: content/browser/plugin_service.cc

Issue 7990005: Use a placeholder instead of the default plugin for missing plug-ins on Mac and Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 3 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: content/browser/plugin_service.cc
diff --git a/content/browser/plugin_service.cc b/content/browser/plugin_service.cc
index 4f0aabfafac2da9b2fb793631b335ca24fa4af85..2c74921ac9332506a1cc1d6dbd78b88b1ab9082f 100644
--- a/content/browser/plugin_service.cc
+++ b/content/browser/plugin_service.cc
@@ -62,6 +62,12 @@ static void GetPluginsForGroupsCallback(
callback.Run(groups);
}
+static void GetPluginsAndIgnoreCallback(
+ const base::Closure& callback,
+ const std::vector<webkit::WebPluginInfo>& plugins) {
+ callback.Run();
+}
+
// Callback set on the PluginList to assert that plugin loading happens on the
// correct thread.
void WillLoadPluginsCallback() {
@@ -482,6 +488,18 @@ void PluginService::FinishOpenChannelToPlugin(
}
}
+bool PluginService::GetPluginInfoArray(
+ const GURL& url,
+ const std::string& mime_type,
+ bool allow_wildcard,
+ std::vector<webkit::WebPluginInfo>* plugins,
+ std::vector<std::string>* actual_mime_types) {
+ bool use_stale = false;
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
+ url, mime_type, allow_wildcard, &use_stale, plugins, actual_mime_types);
+ return use_stale;
+}
+
bool PluginService::GetPluginInfo(int render_process_id,
int render_view_id,
const content::ResourceContext& context,
@@ -568,6 +586,10 @@ void PluginService::GetPluginsInternal(
base::Bind(&RunGetPluginsCallback, callback, plugins));
}
+void PluginService::EnsurePluginsLoaded(const base::Closure& callback) {
+ GetPlugins(base::Bind(&GetPluginsAndIgnoreCallback, callback));
+}
+
void PluginService::OnWaitableEventSignaled(
base::WaitableEvent* waitable_event) {
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698