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 Thu Aug 29 17:42:12 2013. */ | 6 /* From private/ppb_nacl_private.idl modified Mon Aug 19 14:06:38 2013. */ |
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 struct PP_CompletionCallback callback); | 115 struct PP_CompletionCallback callback); |
116 /* Returns a read-only file descriptor of a file rooted in the Pnacl | 116 /* Returns a read-only file descriptor of a file rooted in the Pnacl |
117 * component directory, or an invalid handle on failure. | 117 * component directory, or an invalid handle on failure. |
118 */ | 118 */ |
119 PP_FileHandle (*GetReadonlyPnaclFd)(const char* filename); | 119 PP_FileHandle (*GetReadonlyPnaclFd)(const char* filename); |
120 /* This creates a temporary file that will be deleted by the time | 120 /* This creates a temporary file that will be deleted by the time |
121 * the last handle is closed (or earlier on POSIX systems), and | 121 * the last handle is closed (or earlier on POSIX systems), and |
122 * returns a posix handle to that temporary file. | 122 * returns a posix handle to that temporary file. |
123 */ | 123 */ |
124 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); | 124 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); |
125 /* Create a temporary file, which will be deleted by the time the | 125 /* Create a temporary file, which will be deleted by the time the last |
126 * last handle is closed (or earlier on POSIX systems), to use for | 126 * handle is closed (or earlier on POSIX systems), to use for the nexe |
127 * the nexe with the cache information given by |pexe_url|, | 127 * with the cache information given by |pexe_url|, |abi_version|, |opt_level|, |
128 * |abi_version|, |opt_level|, |last_modified|, |etag|, and | 128 * |last_modified|, and |etag|. If the nexe is already present |
129 * |has_no_store_header|. If the nexe is already present in the | 129 * in the cache, |is_hit| is set to PP_TRUE and the contents of the nexe |
130 * cache, |is_hit| is set to PP_TRUE and the contents of the nexe | 130 * will be copied into the temporary file. Otherwise |is_hit| is set to |
131 * will be copied into the temporary file. Otherwise |is_hit| is set | 131 * PP_FALSE and the temporary file will be writeable. |
132 * to PP_FALSE and the temporary file will be writeable. Currently | 132 * Currently the implementation is a stub, which always sets is_hit to false |
133 * the implementation is a stub, which always sets is_hit to false | 133 * and calls the implementation of CreateTemporaryFile. In a subsequent CL |
134 * and calls the implementation of CreateTemporaryFile. In a | 134 * it will call into the browser which will remember the association between |
135 * subsequent CL it will call into the browser which will remember | 135 * the cache key and the fd, and copy the nexe into the cache after the |
136 * the association between the cache key and the fd, and copy the | 136 * translation finishes. |
137 * nexe into the cache after the translation finishes. | |
138 */ | 137 */ |
139 int32_t (*GetNexeFd)(PP_Instance instance, | 138 int32_t (*GetNexeFd)(PP_Instance instance, |
140 const char* pexe_url, | 139 const char* pexe_url, |
141 uint32_t abi_version, | 140 uint32_t abi_version, |
142 uint32_t opt_level, | 141 uint32_t opt_level, |
143 const char* last_modified, | 142 const char* last_modified, |
144 const char* etag, | 143 const char* etag, |
145 PP_Bool has_no_store_header, | |
146 PP_Bool* is_hit, | 144 PP_Bool* is_hit, |
147 PP_FileHandle* nexe_handle, | 145 PP_FileHandle* nexe_handle, |
148 struct PP_CompletionCallback callback); | 146 struct PP_CompletionCallback callback); |
149 /* Report to the browser that translation of the pexe for |instance| | 147 /* Report to the browser that translation of the pexe for |instance| |
150 * has finished, or aborted with an error. If |success| is true, the | 148 * has finished, or aborted with an error. If |success| is true, the |
151 * browser may then store the translation in the cache. The renderer | 149 * browser may then store the translation in the cache. The renderer |
152 * must first have called GetNexeFd for the same instance. (The browser is | 150 * must first have called GetNexeFd for the same instance. (The browser is |
153 * not guaranteed to store the nexe even if |success| is true; if there is | 151 * not guaranteed to store the nexe even if |success| is true; if there is |
154 * an error on the browser side, or the file is too big for the cache, or | 152 * an error on the browser side, or the file is too big for the cache, or |
155 * the browser is in incognito mode, no notification will be delivered to | 153 * the browser is in incognito mode, no notification will be delivered to |
(...skipping 19 matching lines...) Expand all Loading... |
175 uint64_t* file_token_hi); | 173 uint64_t* file_token_hi); |
176 }; | 174 }; |
177 | 175 |
178 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 176 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
179 /** | 177 /** |
180 * @} | 178 * @} |
181 */ | 179 */ |
182 | 180 |
183 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 181 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
184 | 182 |
OLD | NEW |