| 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 | 5 |
| 6 /* From trusted/ppb_url_loader_trusted.idl modified Sat Jul 16 16:51:03 2011. */ | 6 /* From trusted/ppb_url_loader_trusted.idl modified Wed Oct 5 14:06:02 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ | 8 #ifndef PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ |
| 9 #define PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ | 9 #define PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
| 13 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
| 14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
| 15 | 15 |
| 16 #define PPB_URLLOADERTRUSTED_INTERFACE_0_3 "PPB_URLLoaderTrusted;0.3" | 16 #define PPB_URLLOADERTRUSTED_INTERFACE_0_3 "PPB_URLLoaderTrusted;0.3" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 int64_t total_bytes_to_be_received); | 38 int64_t total_bytes_to_be_received); |
| 39 /** | 39 /** |
| 40 * @} | 40 * @} |
| 41 */ | 41 */ |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * @addtogroup Interfaces | 44 * @addtogroup Interfaces |
| 45 * @{ | 45 * @{ |
| 46 */ | 46 */ |
| 47 /* Available only to trusted implementations. */ | 47 /* Available only to trusted implementations. */ |
| 48 struct PPB_URLLoaderTrusted { | 48 struct PPB_URLLoaderTrusted_0_3 { |
| 49 /** | 49 /** |
| 50 * Grant this URLLoader the capability to make unrestricted cross-origin | 50 * Grant this URLLoader the capability to make unrestricted cross-origin |
| 51 * requests. | 51 * requests. |
| 52 */ | 52 */ |
| 53 void (*GrantUniversalAccess)(PP_Resource loader); | 53 void (*GrantUniversalAccess)(PP_Resource loader); |
| 54 /** | 54 /** |
| 55 * Registers that the given function will be called when the upload or | 55 * Registers that the given function will be called when the upload or |
| 56 * downloaded byte count has changed. This is not exposed on the untrusted | 56 * downloaded byte count has changed. This is not exposed on the untrusted |
| 57 * interface because it can be quite chatty and encourages people to write | 57 * interface because it can be quite chatty and encourages people to write |
| 58 * feedback UIs that update as frequently as the progress updates. | 58 * feedback UIs that update as frequently as the progress updates. |
| 59 * | 59 * |
| 60 * The other serious gotcha with this callback is that the callback must not | 60 * The other serious gotcha with this callback is that the callback must not |
| 61 * mutate the URL loader or cause it to be destroyed. | 61 * mutate the URL loader or cause it to be destroyed. |
| 62 * | 62 * |
| 63 * However, the proxy layer needs this information to push to the other | 63 * However, the proxy layer needs this information to push to the other |
| 64 * process, so we expose it here. Only one callback can be set per URL | 64 * process, so we expose it here. Only one callback can be set per URL |
| 65 * Loader. Setting to a NULL callback will disable it. | 65 * Loader. Setting to a NULL callback will disable it. |
| 66 */ | 66 */ |
| 67 void (*RegisterStatusCallback)(PP_Resource loader, | 67 void (*RegisterStatusCallback)(PP_Resource loader, |
| 68 PP_URLLoaderTrusted_StatusCallback cb); | 68 PP_URLLoaderTrusted_StatusCallback cb); |
| 69 }; | 69 }; |
| 70 |
| 71 typedef struct PPB_URLLoaderTrusted_0_3 PPB_URLLoaderTrusted; |
| 70 /** | 72 /** |
| 71 * @} | 73 * @} |
| 72 */ | 74 */ |
| 73 | 75 |
| 74 #endif /* PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ */ | 76 #endif /* PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ */ |
| 75 | 77 |
| OLD | NEW |