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

Side by Side Diff: content/browser/plugin_service_impl.h

Issue 12315023: Merge 180159 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 10 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 | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_service_impl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_IMPL_H_ 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 webkit::npapi::PluginList* plugin_list) OVERRIDE; 113 webkit::npapi::PluginList* plugin_list) OVERRIDE;
114 #if defined(OS_MACOSX) 114 #if defined(OS_MACOSX)
115 virtual void AppActivated() OVERRIDE; 115 virtual void AppActivated() OVERRIDE;
116 #endif 116 #endif
117 117
118 // Returns the plugin process host corresponding to the plugin process that 118 // Returns the plugin process host corresponding to the plugin process that
119 // has been started by this service. This will start a process to host the 119 // has been started by this service. This will start a process to host the
120 // 'plugin_path' if needed. If the process fails to start, the return value 120 // 'plugin_path' if needed. If the process fails to start, the return value
121 // is NULL. Must be called on the IO thread. 121 // is NULL. Must be called on the IO thread.
122 PluginProcessHost* FindOrStartNpapiPluginProcess( 122 PluginProcessHost* FindOrStartNpapiPluginProcess(
123 const FilePath& plugin_path); 123 int render_process_id, const FilePath& plugin_path);
124 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess( 124 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess(
125 int render_process_id,
125 const FilePath& plugin_path, 126 const FilePath& plugin_path,
126 const FilePath& profile_data_directory, 127 const FilePath& profile_data_directory,
127 PpapiPluginProcessHost::PluginClient* client); 128 PpapiPluginProcessHost::PluginClient* client);
128 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess( 129 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess(
129 const FilePath& plugin_path); 130 int render_process_id, const FilePath& plugin_path);
130 131
131 // Opens a channel to a plugin process for the given mime type, starting 132 // Opens a channel to a plugin process for the given mime type, starting
132 // a new plugin process if necessary. This must be called on the IO thread 133 // a new plugin process if necessary. This must be called on the IO thread
133 // or else a deadlock can occur. 134 // or else a deadlock can occur.
134 void OpenChannelToNpapiPlugin(int render_process_id, 135 void OpenChannelToNpapiPlugin(int render_process_id,
135 int render_view_id, 136 int render_view_id,
136 const GURL& url, 137 const GURL& url,
137 const GURL& page_url, 138 const GURL& page_url,
138 const std::string& mime_type, 139 const std::string& mime_type,
139 PluginProcessHost::Client* client); 140 PluginProcessHost::Client* client);
140 void OpenChannelToPpapiPlugin(const FilePath& plugin_path, 141 void OpenChannelToPpapiPlugin(int render_process_id,
142 const FilePath& plugin_path,
141 const FilePath& profile_data_directory, 143 const FilePath& profile_data_directory,
142 PpapiPluginProcessHost::PluginClient* client); 144 PpapiPluginProcessHost::PluginClient* client);
143 void OpenChannelToPpapiBroker(const FilePath& path, 145 void OpenChannelToPpapiBroker(int render_process_id,
146 const FilePath& path,
144 PpapiPluginProcessHost::BrokerClient* client); 147 PpapiPluginProcessHost::BrokerClient* client);
145 148
146 // Cancels opening a channel to a NPAPI plugin. 149 // Cancels opening a channel to a NPAPI plugin.
147 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); 150 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client);
148 151
149 // Used to monitor plug-in stability. 152 // Used to monitor plug-in stability.
150 void RegisterPluginCrash(const FilePath& plugin_path); 153 void RegisterPluginCrash(const FilePath& plugin_path);
151 154
152 private: 155 private:
153 friend struct DefaultSingletonTraits<PluginServiceImpl>; 156 friend struct DefaultSingletonTraits<PluginServiceImpl>;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 int render_process_id, 194 int render_process_id,
192 int render_view_id, 195 int render_view_id,
193 const GURL& url, 196 const GURL& url,
194 const GURL& page_url, 197 const GURL& page_url,
195 const std::string& mime_type, 198 const std::string& mime_type,
196 PluginProcessHost::Client* client, 199 PluginProcessHost::Client* client,
197 ResourceContext* resource_context); 200 ResourceContext* resource_context);
198 201
199 // Helper so we can finish opening the channel after looking up the 202 // Helper so we can finish opening the channel after looking up the
200 // plugin. 203 // plugin.
201 void FinishOpenChannelToPlugin( 204 void FinishOpenChannelToPlugin(int render_process_id,
202 const FilePath& plugin_path, 205 const FilePath& plugin_path,
203 PluginProcessHost::Client* client); 206 PluginProcessHost::Client* client);
204 207
205 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 208 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID)
206 // Registers a new FilePathWatcher for a given path. 209 // Registers a new FilePathWatcher for a given path.
207 static void RegisterFilePathWatcher( 210 static void RegisterFilePathWatcher(
208 base::files::FilePathWatcher* watcher, 211 base::files::FilePathWatcher* watcher,
209 const FilePath& path, 212 const FilePath& path,
210 base::files::FilePathWatcher::Delegate* delegate); 213 base::files::FilePathWatcher::Delegate* delegate);
211 #endif 214 #endif
212 215
213 // The plugin list instance. 216 // The plugin list instance.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 248
246 // Used to detect if a given plug-in is crashing over and over. 249 // Used to detect if a given plug-in is crashing over and over.
247 std::map<FilePath, std::vector<base::Time> > crash_times_; 250 std::map<FilePath, std::vector<base::Time> > crash_times_;
248 251
249 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 252 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
250 }; 253 };
251 254
252 } // namespace content 255 } // namespace content
253 256
254 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 257 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698