| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // TODO: Need to deal with NPAPI's NPSavedData. | 5 // TODO: Need to deal with NPAPI's NPSavedData. |
| 6 // I haven't seen plugins use it yet. | 6 // I haven't seen plugins use it yet. |
| 7 | 7 |
| 8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // when the stream is complete; otherwise it will not. | 106 // when the stream is complete; otherwise it will not. |
| 107 // Set object_url to true if the load is for the object tag's | 107 // Set object_url to true if the load is for the object tag's |
| 108 // url, or false if it's for a url that the plugin | 108 // url, or false if it's for a url that the plugin |
| 109 // fetched through NPN_GetUrl[Notify]. | 109 // fetched through NPN_GetUrl[Notify]. |
| 110 PluginStreamUrl *CreateStream(int resource_id, | 110 PluginStreamUrl *CreateStream(int resource_id, |
| 111 const std::string &url, | 111 const std::string &url, |
| 112 const std::string &mime_type, | 112 const std::string &mime_type, |
| 113 bool notify_needed, | 113 bool notify_needed, |
| 114 void *notify_data); | 114 void *notify_data); |
| 115 | 115 |
| 116 // Convenience function for sending a stream from a URL to this instance. | |
| 117 // URL can be a relative or a fully qualified url. | |
| 118 void SendStream(const std::string& url, bool notify_needed, | |
| 119 void* notify_data); | |
| 120 // For each instance, we track all streams. When the | 116 // For each instance, we track all streams. When the |
| 121 // instance closes, all remaining streams are also | 117 // instance closes, all remaining streams are also |
| 122 // closed. All streams associated with this instance | 118 // closed. All streams associated with this instance |
| 123 // should call AddStream so that they can be cleaned | 119 // should call AddStream so that they can be cleaned |
| 124 // up when the instance shuts down. | 120 // up when the instance shuts down. |
| 125 void AddStream(PluginStream* stream); | 121 void AddStream(PluginStream* stream); |
| 126 | 122 |
| 127 // This is called when a stream is closed. We remove the stream from the | 123 // This is called when a stream is closed. We remove the stream from the |
| 128 // list, which releases the reference maintained to the stream. | 124 // list, which releases the reference maintained to the stream. |
| 129 void RemoveStream(PluginStream* stream); | 125 void RemoveStream(PluginStream* stream); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 253 |
| 258 // True if in CloseStreams(). | 254 // True if in CloseStreams(). |
| 259 bool in_close_streams_; | 255 bool in_close_streams_; |
| 260 | 256 |
| 261 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); | 257 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); |
| 262 }; | 258 }; |
| 263 | 259 |
| 264 } // namespace NPAPI | 260 } // namespace NPAPI |
| 265 | 261 |
| 266 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 262 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| OLD | NEW |