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