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

Unified Diff: content/browser/plugin_service.h

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.h
diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h
index f662b33f0a78c825b00518e76e787a1eb558ae16..d9fbc8b612e8c7b1f2b9b2405e8d6dfd951c48ea 100644
--- a/content/browser/plugin_service.h
+++ b/content/browser/plugin_service.h
@@ -121,7 +121,17 @@ class CONTENT_EXPORT PluginService
void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client);
// Gets the plugin in the list of plugins that matches the given url and mime
- // type. Must be called on the FILE thread if |use_stale| is NULL.
+ // type. Returns true if the data is frome a stale plugin list, false if it
+ // is up to date. This can be called from any thread.
+ bool GetPluginInfoArray(const GURL& url,
jam 2011/09/30 17:01:21 is it really necessary to add a wrapper function a
Bernhard Bauer 2011/09/30 17:22:21 That's at least Robert's plan for the future. I co
jam 2011/09/30 17:40:19 I see. it's a bit unfortunate to have these wrappe
+ const std::string& mime_type,
+ bool allow_wildcard,
+ std::vector<webkit::WebPluginInfo>* info,
+ std::vector<std::string>* actual_mime_types);
+
+ // Gets plugin info for an individual plugin and filters the plugins using
+ // the |context| and renderer IDs. This will report whether the data is stale
+ // via |is_stale| and returns whether or not the plugin can be found.
bool GetPluginInfo(int render_process_id,
int render_view_id,
const content::ResourceContext& context,
@@ -138,13 +148,18 @@ class CONTENT_EXPORT PluginService
void RefreshPluginList();
// Asynchronously loads plugins if necessary and then calls back to the
- // provided function on the calling MessageLoop on completion.
+ // provided function on the calling MessageLoop with the list of plugins
+ // on completion.
void GetPlugins(const GetPluginsCallback& callback);
// Asynchronously loads the list of plugin groups if necessary and then calls
// back to the provided function on the calling MessageLoop on completion.
void GetPluginGroups(const GetPluginGroupsCallback& callback);
+ // Asynchronously loads plugins if necessary and then calls back to the
+ // provided function on the calling MessageLoop on completion.
+ void EnsurePluginsLoaded(const base::Closure& callback);
jam 2011/09/30 17:01:21 this function doesn't seem necessary since it can
Bernhard Bauer 2011/09/30 17:22:21 I find it a bit awkward having the list of plug-in
jam 2011/09/30 17:40:19 we already do this (i.e. BufferedRersourceHandler)
Bernhard Bauer 2011/10/05 13:34:33 ok, done.
+
// Tells all the renderer processes to throw away their cache of the plugin
// list, and optionally also reload all the pages with plugins.
// NOTE: can only be called on the UI thread.

Powered by Google App Engine
This is Rietveld 408576698