OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This class responds to requests from renderers for the list of plugins, and | 5 // This class responds to requests from renderers for the list of plugins, and |
6 // also a proxy object for plugin instances. | 6 // also a proxy object for plugin instances. |
7 | 7 |
8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 PluginProcessHost::Client* client); | 113 PluginProcessHost::Client* client); |
114 void OpenChannelToPpapiPlugin(const FilePath& path, | 114 void OpenChannelToPpapiPlugin(const FilePath& path, |
115 PpapiPluginProcessHost::PluginClient* client); | 115 PpapiPluginProcessHost::PluginClient* client); |
116 void OpenChannelToPpapiBroker(const FilePath& path, | 116 void OpenChannelToPpapiBroker(const FilePath& path, |
117 PpapiPluginProcessHost::BrokerClient* client); | 117 PpapiPluginProcessHost::BrokerClient* client); |
118 | 118 |
119 // Cancels opening a channel to a NPAPI plugin. | 119 // Cancels opening a channel to a NPAPI plugin. |
120 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); | 120 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); |
121 | 121 |
122 // Gets the plugin in the list of plugins that matches the given url and mime | 122 // Gets the plugin in the list of plugins that matches the given url and mime |
123 // type. Must be called on the FILE thread if |use_stale| is NULL. | 123 // type. Returns true if the data is frome a stale plugin list, false if it |
| 124 // is up to date. This can be called from any thread. |
| 125 bool GetPluginInfoArray(const GURL& url, |
| 126 const std::string& mime_type, |
| 127 bool allow_wildcard, |
| 128 std::vector<webkit::WebPluginInfo>* info, |
| 129 std::vector<std::string>* actual_mime_types); |
| 130 |
| 131 // Gets plugin info for an individual plugin and filters the plugins using |
| 132 // the |context| and renderer IDs. This will report whether the data is stale |
| 133 // via |is_stale| and returns whether or not the plugin can be found. |
124 bool GetPluginInfo(int render_process_id, | 134 bool GetPluginInfo(int render_process_id, |
125 int render_view_id, | 135 int render_view_id, |
126 const content::ResourceContext& context, | 136 const content::ResourceContext& context, |
127 const GURL& url, | 137 const GURL& url, |
128 const GURL& page_url, | 138 const GURL& page_url, |
129 const std::string& mime_type, | 139 const std::string& mime_type, |
130 bool allow_wildcard, | 140 bool allow_wildcard, |
131 bool* use_stale, | 141 bool* use_stale, |
132 webkit::WebPluginInfo* info, | 142 webkit::WebPluginInfo* info, |
133 std::string* actual_mime_type); | 143 std::string* actual_mime_type); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 content::PluginServiceFilter* filter_; | 237 content::PluginServiceFilter* filter_; |
228 | 238 |
229 std::set<PluginProcessHost::Client*> pending_plugin_clients_; | 239 std::set<PluginProcessHost::Client*> pending_plugin_clients_; |
230 | 240 |
231 DISALLOW_COPY_AND_ASSIGN(PluginService); | 241 DISALLOW_COPY_AND_ASSIGN(PluginService); |
232 }; | 242 }; |
233 | 243 |
234 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); | 244 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); |
235 | 245 |
236 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 246 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
OLD | NEW |