| 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 /* From private/ppb_nacl_private.idl modified Mon Feb 10 11:05:29 2014. */ | 6 /* From private/ppb_nacl_private.idl modified Fri Feb 14 21:39:55 2014. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
| 9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 uint32_t options); | 120 uint32_t options); |
| 121 /* Returns a read-only file descriptor of a file rooted in the Pnacl | 121 /* Returns a read-only file descriptor of a file rooted in the Pnacl |
| 122 * component directory, or an invalid handle on failure. | 122 * component directory, or an invalid handle on failure. |
| 123 */ | 123 */ |
| 124 PP_FileHandle (*GetReadonlyPnaclFd)(const char* filename); | 124 PP_FileHandle (*GetReadonlyPnaclFd)(const char* filename); |
| 125 /* This creates a temporary file that will be deleted by the time | 125 /* This creates a temporary file that will be deleted by the time |
| 126 * the last handle is closed (or earlier on POSIX systems), and | 126 * the last handle is closed (or earlier on POSIX systems), and |
| 127 * returns a posix handle to that temporary file. | 127 * returns a posix handle to that temporary file. |
| 128 */ | 128 */ |
| 129 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); | 129 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); |
| 130 /* Create a temporary file, which will be deleted by the time the | 130 /* Create a temporary file, which will be deleted by the time the last handle |
| 131 * last handle is closed (or earlier on POSIX systems), to use for | 131 * is closed (or earlier on POSIX systems), to use for the nexe with the cache |
| 132 * the nexe with the cache information given by |pexe_url|, | 132 * information given by |pexe_url|, |abi_version|, |opt_level|, |
| 133 * |abi_version|, |opt_level|, |last_modified|, |etag|, and | 133 * |last_modified|, |etag|, |has_no_store_header|, |sandbox_isa|, and |
| 134 * |has_no_store_header|. If the nexe is already present in the | 134 * |extra_flags|. If the nexe is already present in the cache, |is_hit| is set |
| 135 * cache, |is_hit| is set to PP_TRUE and the contents of the nexe | 135 * to PP_TRUE and the contents of the nexe will be copied into the temporary |
| 136 * will be copied into the temporary file. Otherwise |is_hit| is set | 136 * file. Otherwise |is_hit| is set to PP_FALSE and the temporary file will be |
| 137 * to PP_FALSE and the temporary file will be writeable. Currently | 137 * writeable. Currently the implementation is a stub, which always sets |
| 138 * the implementation is a stub, which always sets is_hit to false | 138 * is_hit to false and calls the implementation of CreateTemporaryFile. In a |
| 139 * and calls the implementation of CreateTemporaryFile. In a | 139 * subsequent CL it will call into the browser which will remember the |
| 140 * subsequent CL it will call into the browser which will remember | 140 * association between the cache key and the fd, and copy the nexe into the |
| 141 * the association between the cache key and the fd, and copy the | 141 * cache after the translation finishes. |
| 142 * nexe into the cache after the translation finishes. | |
| 143 */ | 142 */ |
| 144 int32_t (*GetNexeFd)(PP_Instance instance, | 143 int32_t (*GetNexeFd)(PP_Instance instance, |
| 145 const char* pexe_url, | 144 const char* pexe_url, |
| 146 uint32_t abi_version, | 145 uint32_t abi_version, |
| 147 uint32_t opt_level, | 146 uint32_t opt_level, |
| 148 const char* last_modified, | 147 const char* last_modified, |
| 149 const char* etag, | 148 const char* etag, |
| 150 PP_Bool has_no_store_header, | 149 PP_Bool has_no_store_header, |
| 150 const char* sandbox_isa, |
| 151 const char* extra_flags, |
| 151 PP_Bool* is_hit, | 152 PP_Bool* is_hit, |
| 152 PP_FileHandle* nexe_handle, | 153 PP_FileHandle* nexe_handle, |
| 153 struct PP_CompletionCallback callback); | 154 struct PP_CompletionCallback callback); |
| 154 /* Report to the browser that translation of the pexe for |instance| | 155 /* Report to the browser that translation of the pexe for |instance| |
| 155 * has finished, or aborted with an error. If |success| is true, the | 156 * has finished, or aborted with an error. If |success| is true, the |
| 156 * browser may then store the translation in the cache. The renderer | 157 * browser may then store the translation in the cache. The renderer |
| 157 * must first have called GetNexeFd for the same instance. (The browser is | 158 * must first have called GetNexeFd for the same instance. (The browser is |
| 158 * not guaranteed to store the nexe even if |success| is true; if there is | 159 * not guaranteed to store the nexe even if |success| is true; if there is |
| 159 * an error on the browser side, or the file is too big for the cache, or | 160 * an error on the browser side, or the file is too big for the cache, or |
| 160 * the browser is in incognito mode, no notification will be delivered to | 161 * the browser is in incognito mode, no notification will be delivered to |
| (...skipping 28 matching lines...) Expand all Loading... |
| 189 struct PP_Var value); | 190 struct PP_Var value); |
| 190 }; | 191 }; |
| 191 | 192 |
| 192 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 193 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
| 193 /** | 194 /** |
| 194 * @} | 195 * @} |
| 195 */ | 196 */ |
| 196 | 197 |
| 197 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 198 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
| 198 | 199 |
| OLD | NEW |