Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 | 121 |
| 122 // Returns the plugin process host corresponding to the plugin process that | 122 // Returns the plugin process host corresponding to the plugin process that |
| 123 // has been started by this service. This will start a process to host the | 123 // has been started by this service. This will start a process to host the |
| 124 // 'plugin_path' if needed. If the process fails to start, the return value | 124 // 'plugin_path' if needed. If the process fails to start, the return value |
| 125 // is NULL. Must be called on the IO thread. | 125 // is NULL. Must be called on the IO thread. |
| 126 PluginProcessHost* FindOrStartNpapiPluginProcess( | 126 PluginProcessHost* FindOrStartNpapiPluginProcess( |
| 127 const FilePath& plugin_path); | 127 const FilePath& plugin_path); |
| 128 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess( | 128 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess( |
| 129 const FilePath& plugin_path, | 129 const FilePath& plugin_path, |
| 130 const FilePath& profile_data_directory, | 130 const FilePath& profile_data_directory, |
| 131 int render_process_id, | |
|
brettw
2012/09/10 22:27:11
Can you add a comment about what this is?
| |
| 131 PpapiPluginProcessHost::PluginClient* client); | 132 PpapiPluginProcessHost::PluginClient* client); |
| 132 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess( | 133 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess( |
| 133 const FilePath& plugin_path); | 134 const FilePath& plugin_path); |
| 134 | 135 |
| 135 // Opens a channel to a plugin process for the given mime type, starting | 136 // Opens a channel to a plugin process for the given mime type, starting |
| 136 // a new plugin process if necessary. This must be called on the IO thread | 137 // a new plugin process if necessary. This must be called on the IO thread |
| 137 // or else a deadlock can occur. | 138 // or else a deadlock can occur. |
| 138 void OpenChannelToNpapiPlugin(int render_process_id, | 139 void OpenChannelToNpapiPlugin(int render_process_id, |
| 139 int render_view_id, | 140 int render_view_id, |
| 140 const GURL& url, | 141 const GURL& url, |
| 141 const GURL& page_url, | 142 const GURL& page_url, |
| 142 const std::string& mime_type, | 143 const std::string& mime_type, |
| 143 PluginProcessHost::Client* client); | 144 PluginProcessHost::Client* client); |
| 144 void OpenChannelToPpapiPlugin(const FilePath& plugin_path, | 145 void OpenChannelToPpapiPlugin(const FilePath& plugin_path, |
| 145 const FilePath& profile_data_directory, | 146 const FilePath& profile_data_directory, |
| 147 int render_process_id, | |
| 146 PpapiPluginProcessHost::PluginClient* client); | 148 PpapiPluginProcessHost::PluginClient* client); |
| 147 void OpenChannelToPpapiBroker(const FilePath& path, | 149 void OpenChannelToPpapiBroker(const FilePath& path, |
| 148 PpapiPluginProcessHost::BrokerClient* client); | 150 PpapiPluginProcessHost::BrokerClient* client); |
| 149 | 151 |
| 150 // Cancels opening a channel to a NPAPI plugin. | 152 // Cancels opening a channel to a NPAPI plugin. |
| 151 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); | 153 void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); |
| 152 | 154 |
| 153 // Used to monitor plug-in stability. | 155 // Used to monitor plug-in stability. |
| 154 void RegisterPluginCrash(const FilePath& plugin_path); | 156 void RegisterPluginCrash(const FilePath& plugin_path); |
| 155 | 157 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 254 scoped_refptr<PluginLoaderPosix> plugin_loader_; | 256 scoped_refptr<PluginLoaderPosix> plugin_loader_; |
| 255 #endif | 257 #endif |
| 256 | 258 |
| 257 // Used to detect if a given plug-in is crashing over and over. | 259 // Used to detect if a given plug-in is crashing over and over. |
| 258 std::map<FilePath, std::vector<base::Time> > crash_times_; | 260 std::map<FilePath, std::vector<base::Time> > crash_times_; |
| 259 | 261 |
| 260 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); | 262 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); |
| 261 }; | 263 }; |
| 262 | 264 |
| 263 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 265 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
| OLD | NEW |