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

Side by Side 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: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | content/browser/plugin_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 struct PepperPluginInfo; 38 struct PepperPluginInfo;
39 class PluginDirWatcherDelegate; 39 class PluginDirWatcherDelegate;
40 40
41 namespace base { 41 namespace base {
42 class MessageLoopProxy; 42 class MessageLoopProxy;
43 } 43 }
44 44
45 namespace content { 45 namespace content {
46 class ResourceContext; 46 class ResourceContext;
47 class PluginServiceFilter; 47 class PluginServiceFilter;
48 struct PluginServiceFilterParams;
48 } 49 }
49 50
50 namespace webkit { 51 namespace webkit {
51 namespace npapi { 52 namespace npapi {
52 class PluginGroup; 53 class PluginGroup;
53 class PluginList; 54 class PluginList;
54 } 55 }
55 } 56 }
56 57
57 // This must be created on the main thread but it's only called on the IO/file 58 // This must be created on the main thread but it's only called on the IO/file
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Gets plugin info for an individual plugin and filters the plugins using 132 // 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 // 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. 134 // via |is_stale| and returns whether or not the plugin can be found.
134 bool GetPluginInfo(int render_process_id, 135 bool GetPluginInfo(int render_process_id,
135 int render_view_id, 136 int render_view_id,
136 const content::ResourceContext& context, 137 const content::ResourceContext& context,
137 const GURL& url, 138 const GURL& url,
138 const GURL& page_url, 139 const GURL& page_url,
139 const std::string& mime_type, 140 const std::string& mime_type,
140 bool allow_wildcard, 141 bool allow_wildcard,
141 bool* use_stale, 142 bool* is_stale,
142 webkit::WebPluginInfo* info, 143 webkit::WebPluginInfo* info,
143 std::string* actual_mime_type); 144 std::string* actual_mime_type);
144 145
146 // Get plugin info by plugin path (including disabled plugins). Returns true
147 // if the plugin is found and WebPluginInfo has been filled in |info|. This
148 // will use cached data in the plugin list.
149 bool GetPluginInfoByPath(const FilePath& plugin_path,
150 webkit::WebPluginInfo* info);
151
145 // Marks the plugin list as dirty and will cause the plugins to be reloaded 152 // Marks the plugin list as dirty and will cause the plugins to be reloaded
146 // on the next access through GetPlugins() or GetPluginGroups(). 153 // on the next access through GetPlugins() or GetPluginGroups().
147 void RefreshPluginList(); 154 void RefreshPluginList();
148 155
149 // Asynchronously loads plugins if necessary and then calls back to the 156 // Asynchronously loads plugins if necessary and then calls back to the
150 // provided function on the calling MessageLoop on completion. 157 // provided function on the calling MessageLoop on completion.
151 void GetPlugins(const GetPluginsCallback& callback); 158 void GetPlugins(const GetPluginsCallback& callback);
152 159
153 // Asynchronously loads the list of plugin groups if necessary and then calls 160 // Asynchronously loads the list of plugin groups if necessary and then calls
154 // back to the provided function on the calling MessageLoop on completion. 161 // back to the provided function on the calling MessageLoop on completion.
(...skipping 25 matching lines...) Expand all
180 const NotificationDetails& details); 187 const NotificationDetails& details);
181 188
182 void RegisterPepperPlugins(); 189 void RegisterPepperPlugins();
183 190
184 PepperPluginInfo* GetRegisteredPpapiPluginInfo(const FilePath& plugin_path); 191 PepperPluginInfo* GetRegisteredPpapiPluginInfo(const FilePath& plugin_path);
185 192
186 // Function that is run on the FILE thread to load the plugins synchronously. 193 // Function that is run on the FILE thread to load the plugins synchronously.
187 void GetPluginsInternal(base::MessageLoopProxy* target_loop, 194 void GetPluginsInternal(base::MessageLoopProxy* target_loop,
188 const GetPluginsCallback& callback); 195 const GetPluginsCallback& callback);
189 196
197 // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible
198 // because more arity is needed <http://crbug.com/98542>. This just forwards.
199 void ForwardGetAllowedPluginForOpenChannelToPlugin(
200 const content::PluginServiceFilterParams& params,
201 const GURL& url,
202 const std::string& mime_type,
203 PluginProcessHost::Client* client,
204 const std::vector<webkit::WebPluginInfo>&);
190 // Helper so we can do the plugin lookup on the FILE thread. 205 // Helper so we can do the plugin lookup on the FILE thread.
191 void GetAllowedPluginForOpenChannelToPlugin( 206 void GetAllowedPluginForOpenChannelToPlugin(
192 int render_process_id, 207 int render_process_id,
193 int render_view_id, 208 int render_view_id,
194 const GURL& url, 209 const GURL& url,
195 const GURL& page_url, 210 const GURL& page_url,
196 const std::string& mime_type, 211 const std::string& mime_type,
197 PluginProcessHost::Client* client, 212 PluginProcessHost::Client* client,
198 const content::ResourceContext* resource_context); 213 const content::ResourceContext* resource_context);
199 214
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 content::PluginServiceFilter* filter_; 252 content::PluginServiceFilter* filter_;
238 253
239 std::set<PluginProcessHost::Client*> pending_plugin_clients_; 254 std::set<PluginProcessHost::Client*> pending_plugin_clients_;
240 255
241 DISALLOW_COPY_AND_ASSIGN(PluginService); 256 DISALLOW_COPY_AND_ASSIGN(PluginService);
242 }; 257 };
243 258
244 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); 259 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService);
245 260
246 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ 261 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | content/browser/plugin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698