Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 PPAPI_C_PPB_URL_REQUEST_INFO_H_ | 5 #ifndef PPAPI_C_PPB_URL_REQUEST_INFO_H_ |
| 6 #define PPAPI_C_PPB_URL_REQUEST_INFO_H_ | 6 #define PPAPI_C_PPB_URL_REQUEST_INFO_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 */ | 71 */ |
| 72 PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, | 72 PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * This corresponds to a PP_Bool (default=PP_FALSE). | 75 * This corresponds to a PP_Bool (default=PP_FALSE). |
| 76 * Set this value to PP_TRUE if you want to be able to poll the upload | 76 * Set this value to PP_TRUE if you want to be able to poll the upload |
| 77 * progress using PPB_URLLoader.GetUplaodProgress(). | 77 * progress using PPB_URLLoader.GetUplaodProgress(). |
| 78 */ | 78 */ |
| 79 PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS, | 79 PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS, |
| 80 | 80 |
| 81 // Set to a String to set a custom referrer (if empty, the referrer header | 81 /** |
| 82 // will be omitted), or to an Undefined Var to use the default referrer. Only | 82 * This corresponds to a string (PP_VARTYPE_STRING) or may be undefined |
| 83 // loaders with universal access (only available on trusted implementations) | 83 * (PP_VARTYPE_UNDEFINED; default). |
| 84 // will accept URLRequestInfo objects which try to set a custom referrer; if | 84 * Set it to a string to set a custom referrer (if empty, the referrer header |
| 85 // given to a loader without universal access, PP_ERROR_BADARGUMENT will | 85 * will be omitted), or to undefined to use the default referrer. Only loaders |
| 86 // result. | 86 * with universal access (only available on trusted implementations) will |
| 87 // | 87 * accept URLRequestInfo objects that try to set a custom referrer; if given |
| 88 // Undefined/String (default = Undefined) | 88 * to a loader without universal access, PP_ERROR_BADARGUMENT will result. |
| 89 */ | |
| 89 PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, | 90 PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, |
| 90 | 91 |
| 91 // Whether cross-origin requests are allowed. Cross-origin requests are made | 92 /** |
| 92 // using the CORS (Cross-Origin Resource Sharing) algorithm to check whether | 93 * This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE). |
| 93 // the request should be allowed. For the complete CORS algorithm, see: | 94 * Whether cross-origin requests are allowed. Cross-origin requests are made |
| 94 // http://www.w3.org/TR/access-control | 95 * using the CORS (Cross-Origin Resource Sharing) algorithm to check whether |
| 95 // | 96 * the request should be allowed. For the complete CORS algorithm, refer to |
| 96 // Boolean (default = PP_FALSE). | 97 * the <a href="http://www.w3.org/TR/access-control">Cross-Origin Resource |
| 98 * Sharing</a> documentation. | |
| 99 */ | |
| 97 PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, | 100 PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, |
| 98 | 101 |
| 99 // Whether HTTP credentials are sent with cross-origin requests. If false, | 102 /** |
| 100 // no credentials are sent with the request and cookies are ignored in the | 103 * This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE). |
| 101 // response. If the request is not cross-origin, this property is ignored. | 104 * Whether HTTP credentials are sent with cross-origin requests. If false, |
| 102 // | 105 * no credentials are sent with the request and cookies are ignored in the |
| 103 // Boolean (default = PP_FALSE). | 106 * response. If the request is not cross-origin, this property is ignored. |
| 104 PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS | 107 */ |
| 108 PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, | |
| 109 | |
| 110 /** | |
| 111 * This corresponds to a string (PP_VARTYPE_STRING) or may be undefined | |
| 112 * (PP_VARTYPE_UNDEFINED; default). | |
| 113 * Set it to a string to set a custom content-transfer-encoding header (if | |
| 114 * empty, that header will be omitted), or to undefined to use the default (if | |
| 115 * any). Only loaders with universal access (only available on trusted | |
| 116 * implementations) will accept URLRequestInfo objects that try to set a | |
| 117 * custom content transfer encoding; if given to a loader without universal | |
| 118 * access, PP_ERROR_BADARGUMENT will result. | |
| 119 */ | |
| 120 PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING | |
|
darin (slow to review)
2011/04/21 19:47:13
what us a "content-transfer-encoding" header? i k
| |
| 105 } PP_URLRequestProperty; | 121 } PP_URLRequestProperty; |
| 106 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4); | 122 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4); |
| 107 /** | 123 /** |
| 108 * @} | 124 * @} |
| 109 */ | 125 */ |
| 110 | 126 |
| 111 #define PPB_URLREQUESTINFO_INTERFACE "PPB_URLRequestInfo;0.2" | 127 #define PPB_URLREQUESTINFO_INTERFACE "PPB_URLRequestInfo;0.2" |
| 112 | 128 |
| 113 /** | 129 /** |
| 114 * | 130 * |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 int64_t start_offset, | 217 int64_t start_offset, |
| 202 int64_t number_of_bytes, | 218 int64_t number_of_bytes, |
| 203 PP_Time expected_last_modified_time); | 219 PP_Time expected_last_modified_time); |
| 204 }; | 220 }; |
| 205 /** | 221 /** |
| 206 * @} | 222 * @} |
| 207 */ | 223 */ |
| 208 | 224 |
| 209 #endif /* PPAPI_C_PPB_URL_REQUEST_INFO_H_ */ | 225 #endif /* PPAPI_C_PPB_URL_REQUEST_INFO_H_ */ |
| 210 | 226 |
| OLD | NEW |