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

Unified Diff: content/browser/plugin_service.h

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 9 years, 2 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 7060fc37d4c23848a0befb4a0c154874070988b4..ca40aa26c1f6b8e86f98ce0347febb96dd223e94 100644
--- a/content/browser/plugin_service.h
+++ b/content/browser/plugin_service.h
@@ -54,6 +54,10 @@ class PluginList;
}
}
+namespace {
+struct ForwardOpenChannelParams;
jam 2011/10/04 22:42:30 nit: seems a little odd to forward declare stuff i
+}
+
// This must be created on the main thread but it's only called on the IO/file
// thread. This is an asynchronous wrapper around the PluginList interface for
// querying plugin information. This must be used instead of that to avoid
@@ -120,7 +124,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,
+ 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,
@@ -128,10 +142,16 @@ class CONTENT_EXPORT PluginService
const GURL& page_url,
const std::string& mime_type,
bool allow_wildcard,
- bool* use_stale,
+ bool* is_stale,
webkit::WebPluginInfo* info,
std::string* actual_mime_type);
+ // Get plugin info by plugin path (including disabled plugins). Returns true
+ // if the plugin is found and WebPluginInfo has been filled in |info|. This
+ // will use cached data in the plugin list.
+ bool GetPluginInfoByPath(const FilePath& plugin_path,
+ webkit::WebPluginInfo* info);
+
// Marks the plugin list as dirty and will cause the plugins to be reloaded
// on the next access through GetPlugins() or GetPluginGroups().
void RefreshPluginList();
@@ -177,6 +197,14 @@ class CONTENT_EXPORT PluginService
void GetPluginsInternal(base::MessageLoopProxy* target_loop,
const GetPluginsCallback& callback);
+ // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible
+ // because more arity is needed <http://crbug.com/98542>. This just forwards.
Bernhard Bauer 2011/10/05 13:00:46 I'm running into the same issue in http://coderevi
Robert Sesek 2011/10/05 18:27:16 Done.
+ void ForwardGetAllowedPluginForOpenChannelToPlugin(
+ const ForwardOpenChannelParams& params,
+ const GURL& url,
+ const GURL& page_url,
+ const std::string& mime_type,
+ const std::vector<webkit::WebPluginInfo>&);
// Helper so we can do the plugin lookup on the FILE thread.
void GetAllowedPluginForOpenChannelToPlugin(
int render_process_id,

Powered by Google App Engine
This is Rietveld 408576698