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 | 5 |
6 /** | 6 /** |
7 * This file defines the <strong>PPB_URLLoader</strong> interface for loading | 7 * This file defines the <strong>PPB_URLLoader</strong> interface for loading |
8 * URLs. | 8 * URLs. |
9 */ | 9 */ |
10 | 10 |
11 [generate_thunk] | |
12 | |
13 label Chrome { | 11 label Chrome { |
14 M14 = 1.0 | 12 M14 = 1.0 |
15 }; | 13 }; |
16 | 14 |
17 /** | 15 /** |
18 * The <strong>PPB_URLLoader</strong> interface contains pointers to functions | 16 * The <strong>PPB_URLLoader</strong> interface contains pointers to functions |
19 * for loading URLs. The typical steps for loading a URL are: | 17 * for loading URLs. The typical steps for loading a URL are: |
20 * | 18 * |
21 * -# Call Create() to create a URLLoader object. | 19 * -# Call Create() to create a URLLoader object. |
22 * -# Create a <code>URLRequestInfo</code> object and set properties on it. | 20 * -# Create a <code>URLRequestInfo</code> object and set properties on it. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 * property set to PP_TRUE. | 109 * property set to PP_TRUE. |
112 * | 110 * |
113 * @param[in] loader A <code>PP_Resource</code> corresponding to a | 111 * @param[in] loader A <code>PP_Resource</code> corresponding to a |
114 * <code>URLLoader</code>. | 112 * <code>URLLoader</code>. |
115 * @param[in] bytes_sent The number of bytes sent thus far. | 113 * @param[in] bytes_sent The number of bytes sent thus far. |
116 * @param[in] total_bytes_to_be_sent The total number of bytes to be sent. | 114 * @param[in] total_bytes_to_be_sent The total number of bytes to be sent. |
117 * | 115 * |
118 * @return <code>PP_TRUE</code> if the upload progress is available, | 116 * @return <code>PP_TRUE</code> if the upload progress is available, |
119 * <code>PP_FALSE</code> if it is not available. | 117 * <code>PP_FALSE</code> if it is not available. |
120 */ | 118 */ |
121 [always_set_output_parameters] | |
122 PP_Bool GetUploadProgress( | 119 PP_Bool GetUploadProgress( |
123 [in] PP_Resource loader, | 120 [in] PP_Resource loader, |
124 [out] int64_t bytes_sent, | 121 [out] int64_t bytes_sent, |
125 [out] int64_t total_bytes_to_be_sent); | 122 [out] int64_t total_bytes_to_be_sent); |
126 | 123 |
127 /** | 124 /** |
128 * GetDownloadProgress() returns the current download progress, which is | 125 * GetDownloadProgress() returns the current download progress, which is |
129 * meaningful after Open() has been called. Progress only refers to the | 126 * meaningful after Open() has been called. Progress only refers to the |
130 * response body and does not include the headers. | 127 * response body and does not include the headers. |
131 * | 128 * |
132 * This data is only available if the <code>URLRequestInfo</code> passed to | 129 * This data is only available if the <code>URLRequestInfo</code> passed to |
133 * Open() had the <code>PP_URLREQUESTPROPERTY_REPORTDOWNLOADPROGRESS</code> | 130 * Open() had the <code>PP_URLREQUESTPROPERTY_REPORTDOWNLOADPROGRESS</code> |
134 * property set to <code>PP_TRUE</code>. | 131 * property set to <code>PP_TRUE</code>. |
135 * | 132 * |
136 * @param[in] loader A <code>PP_Resource</code> corresponding to a | 133 * @param[in] loader A <code>PP_Resource</code> corresponding to a |
137 * <code>URLLoader</code>. | 134 * <code>URLLoader</code>. |
138 * @param[in] bytes_received The number of bytes received thus far. | 135 * @param[in] bytes_received The number of bytes received thus far. |
139 * @param[in] total_bytes_to_be_received The total number of bytes to be | 136 * @param[in] total_bytes_to_be_received The total number of bytes to be |
140 * received. The total bytes to be received may be unknown, in which case | 137 * received. The total bytes to be received may be unknown, in which case |
141 * <code>total_bytes_to_be_received</code> will be set to -1. | 138 * <code>total_bytes_to_be_received</code> will be set to -1. |
142 * | 139 * |
143 * @return <code>PP_TRUE</code> if the download progress is available, | 140 * @return <code>PP_TRUE</code> if the download progress is available, |
144 * <code>PP_FALSE</code> if it is not available. | 141 * <code>PP_FALSE</code> if it is not available. |
145 */ | 142 */ |
146 [always_set_output_parameters] | |
147 PP_Bool GetDownloadProgress( | 143 PP_Bool GetDownloadProgress( |
148 [in] PP_Resource loader, | 144 [in] PP_Resource loader, |
149 [out] int64_t bytes_received, | 145 [out] int64_t bytes_received, |
150 [out] int64_t total_bytes_to_be_received); | 146 [out] int64_t total_bytes_to_be_received); |
151 | 147 |
152 /** | 148 /** |
153 * GetResponseInfo() returns the current <code>URLResponseInfo</code> object. | 149 * GetResponseInfo() returns the current <code>URLResponseInfo</code> object. |
154 * | 150 * |
155 * @param[in] instance A <code>PP_Resource</code> corresponding to a | 151 * @param[in] instance A <code>PP_Resource</code> corresponding to a |
156 * <code>URLLoader</code>. | 152 * <code>URLLoader</code>. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 * while it is still open, then it will be implicitly closed so you are not | 212 * while it is still open, then it will be implicitly closed so you are not |
217 * required to call Close(). | 213 * required to call Close(). |
218 * | 214 * |
219 * @param[in] loader A <code>PP_Resource</code> corresponding to a | 215 * @param[in] loader A <code>PP_Resource</code> corresponding to a |
220 * <code>URLLoader</code>. | 216 * <code>URLLoader</code>. |
221 */ | 217 */ |
222 void Close( | 218 void Close( |
223 [in] PP_Resource loader); | 219 [in] PP_Resource loader); |
224 }; | 220 }; |
225 | 221 |
OLD | NEW |