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 /* This file contains NaCl private interfaces. This interface is not versioned | 6 /* This file contains NaCl private interfaces. This interface is not versioned |
7 * and is for internal Chrome use. It may change without notice. */ | 7 * and is for internal Chrome use. It may change without notice. */ |
8 | 8 |
9 label Chrome { | 9 label Chrome { |
10 M25 = 1.0 | 10 M25 = 1.0 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 * component directory, or an invalid handle on failure. | 99 * component directory, or an invalid handle on failure. |
100 */ | 100 */ |
101 PP_FileHandle GetReadonlyPnaclFd([in] str_t filename); | 101 PP_FileHandle GetReadonlyPnaclFd([in] str_t filename); |
102 | 102 |
103 /* This creates a temporary file that will be deleted by the time | 103 /* This creates a temporary file that will be deleted by the time |
104 * the last handle is closed (or earlier on POSIX systems), and | 104 * the last handle is closed (or earlier on POSIX systems), and |
105 * returns a posix handle to that temporary file. | 105 * returns a posix handle to that temporary file. |
106 */ | 106 */ |
107 PP_FileHandle CreateTemporaryFile([in] PP_Instance instance); | 107 PP_FileHandle CreateTemporaryFile([in] PP_Instance instance); |
108 | 108 |
109 /* Create a temporary file, which will be deleted by the time the | 109 /* Create a temporary file, which will be deleted by the time the last |
110 * last handle is closed (or earlier on POSIX systems), to use for | 110 * handle is closed (or earlier on POSIX systems), to use for the nexe |
111 * the nexe with the cache information given by |pexe_url|, | 111 * with the cache information given by |pexe_url|, |abi_version|, |opt_level|, |
112 * |abi_version|, |opt_level|, |last_modified|, |etag|, and | 112 * |last_modified|, and |etag|. If the nexe is already present |
113 * |has_no_store_header|. If the nexe is already present in the | 113 * in the cache, |is_hit| is set to PP_TRUE and the contents of the nexe |
114 * cache, |is_hit| is set to PP_TRUE and the contents of the nexe | 114 * will be copied into the temporary file. Otherwise |is_hit| is set to |
115 * will be copied into the temporary file. Otherwise |is_hit| is set | 115 * PP_FALSE and the temporary file will be writeable. |
116 * to PP_FALSE and the temporary file will be writeable. Currently | 116 * Currently the implementation is a stub, which always sets is_hit to false |
117 * the implementation is a stub, which always sets is_hit to false | 117 * and calls the implementation of CreateTemporaryFile. In a subsequent CL |
118 * and calls the implementation of CreateTemporaryFile. In a | 118 * it will call into the browser which will remember the association between |
119 * subsequent CL it will call into the browser which will remember | 119 * the cache key and the fd, and copy the nexe into the cache after the |
120 * the association between the cache key and the fd, and copy the | 120 * translation finishes. |
121 * nexe into the cache after the translation finishes. | |
122 */ | 121 */ |
123 int32_t GetNexeFd([in] PP_Instance instance, | 122 int32_t GetNexeFd([in] PP_Instance instance, |
124 [in] str_t pexe_url, | 123 [in] str_t pexe_url, |
125 [in] uint32_t abi_version, | 124 [in] uint32_t abi_version, |
126 [in] uint32_t opt_level, | 125 [in] uint32_t opt_level, |
127 [in] str_t last_modified, | 126 [in] str_t last_modified, |
128 [in] str_t etag, | 127 [in] str_t etag, |
129 [in] PP_Bool has_no_store_header, | |
130 [out] PP_Bool is_hit, | 128 [out] PP_Bool is_hit, |
131 [out] PP_FileHandle nexe_handle, | 129 [out] PP_FileHandle nexe_handle, |
132 [in] PP_CompletionCallback callback); | 130 [in] PP_CompletionCallback callback); |
133 | 131 |
134 /* Report to the browser that translation of the pexe for |instance| | 132 /* Report to the browser that translation of the pexe for |instance| |
135 * has finished, or aborted with an error. If |success| is true, the | 133 * has finished, or aborted with an error. If |success| is true, the |
136 * browser may then store the translation in the cache. The renderer | 134 * browser may then store the translation in the cache. The renderer |
137 * must first have called GetNexeFd for the same instance. (The browser is | 135 * must first have called GetNexeFd for the same instance. (The browser is |
138 * not guaranteed to store the nexe even if |success| is true; if there is | 136 * not guaranteed to store the nexe even if |success| is true; if there is |
139 * an error on the browser side, or the file is too big for the cache, or | 137 * an error on the browser side, or the file is too big for the cache, or |
(...skipping 17 matching lines...) Expand all Loading... |
157 | 155 |
158 /* Opens a NaCl executable file in the application's extension directory | 156 /* Opens a NaCl executable file in the application's extension directory |
159 * corresponding to the file URL and returns a file descriptor, or an invalid | 157 * corresponding to the file URL and returns a file descriptor, or an invalid |
160 * handle on failure. |metadata| is left unchanged on failure. | 158 * handle on failure. |metadata| is left unchanged on failure. |
161 */ | 159 */ |
162 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance, | 160 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance, |
163 [in] str_t file_url, | 161 [in] str_t file_url, |
164 [out] uint64_t file_token_lo, | 162 [out] uint64_t file_token_lo, |
165 [out] uint64_t file_token_hi); | 163 [out] uint64_t file_token_hi); |
166 }; | 164 }; |
OLD | NEW |