| 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 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ | 5 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ |
| 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ | 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // In case of a redirect, this can be called to update the url. But it must | 33 // In case of a redirect, this can be called to update the url. But it must |
| 34 // be called before Open(). | 34 // be called before Open(). |
| 35 void UpdateUrl(const char* url); | 35 void UpdateUrl(const char* url); |
| 36 | 36 |
| 37 // Opens the stream to the Plugin. | 37 // Opens the stream to the Plugin. |
| 38 // If the mime-type is not specified, we'll try to find one based on the | 38 // If the mime-type is not specified, we'll try to find one based on the |
| 39 // mime-types table and the extension (if any) in the URL. | 39 // mime-types table and the extension (if any) in the URL. |
| 40 // If the size of the stream is known, use length to set the size. If | 40 // If the size of the stream is known, use length to set the size. If |
| 41 // not known, set length to 0. | 41 // not known, set length to 0. |
| 42 // The request_is_seekable parameter indicates whether byte range requests |
| 43 // can be issued on the stream. |
| 42 bool Open(const std::string &mime_type, | 44 bool Open(const std::string &mime_type, |
| 43 const std::string &headers, | 45 const std::string &headers, |
| 44 uint32 length, | 46 uint32 length, |
| 45 uint32 last_modified); | 47 uint32 last_modified, |
| 48 bool request_is_seekable); |
| 46 | 49 |
| 47 // Writes to the stream. | 50 // Writes to the stream. |
| 48 int Write(const char *buf, const int len, int data_offset); | 51 int Write(const char *buf, const int len, int data_offset); |
| 49 | 52 |
| 50 // Write the result as a file. | 53 // Write the result as a file. |
| 51 void WriteAsFile(); | 54 void WriteAsFile(); |
| 52 | 55 |
| 53 // Notify the plugin that a stream is complete. | 56 // Notify the plugin that a stream is complete. |
| 54 void Notify(NPReason reason); | 57 void Notify(NPReason reason); |
| 55 | 58 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 int data_offset_; | 130 int data_offset_; |
| 128 bool seekable_stream_; | 131 bool seekable_stream_; |
| 129 std::string mime_type_; | 132 std::string mime_type_; |
| 130 DISALLOW_EVIL_CONSTRUCTORS(PluginStream); | 133 DISALLOW_EVIL_CONSTRUCTORS(PluginStream); |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace NPAPI | 136 } // namespace NPAPI |
| 134 | 137 |
| 135 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ | 138 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_H__ |
| 136 | 139 |
| OLD | NEW |