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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 interaction with the page. */ | 132 interaction with the page. */ |
133 PP_NACL_READY_STATE_DONE = 4 | 133 PP_NACL_READY_STATE_DONE = 4 |
134 }; | 134 }; |
135 | 135 |
136 struct PP_PNaClOptions { | 136 struct PP_PNaClOptions { |
137 PP_Bool translate; | 137 PP_Bool translate; |
138 PP_Bool is_debug; | 138 PP_Bool is_debug; |
139 int32_t opt_level; | 139 int32_t opt_level; |
140 }; | 140 }; |
141 | 141 |
| 142 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */ |
| 143 typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data, |
| 144 [in] PP_FileHandle file_handle); |
| 145 |
142 /* ManifestService to support irt_open_resource() function. | 146 /* ManifestService to support irt_open_resource() function. |
143 * All functions of the service should have PP_Bool return value. It represents | 147 * All functions of the service should have PP_Bool return value. It represents |
144 * whether the service is still alive or not. Trivially Quit() should always | 148 * whether the service is still alive or not. Trivially Quit() should always |
145 * return false. However, other functions also can return false. | 149 * return false. However, other functions also can return false. |
146 * Once false is called, as the service has been destructed, all functions | 150 * Once false is called, as the service has been destructed, all functions |
147 * should never be called afterwords. | 151 * should never be called afterwords. |
148 */ | 152 */ |
149 interface PP_ManifestService { | 153 interface PPP_ManifestService { |
150 /* Called when ManifestService should be destructed. */ | 154 /* Called when ManifestService should be destructed. */ |
151 PP_Bool Quit([inout] mem_t user_data); | 155 PP_Bool Quit([inout] mem_t user_data); |
152 | 156 |
153 /* Called when PPAPI initialization in the NaCl plugin is finished. */ | 157 /* Called when PPAPI initialization in the NaCl plugin is finished. */ |
154 PP_Bool StartupInitializationComplete([inout] mem_t user_data); | 158 PP_Bool StartupInitializationComplete([inout] mem_t user_data); |
| 159 |
| 160 /* Called when irt_open_resource() is invoked in the NaCl plugin. |
| 161 * Upon completion, callback will be invoked with given callback_user_data |
| 162 * and the result file handle (or PP_kInvalidFileHandle on error). */ |
| 163 PP_Bool OpenResource([inout] mem_t user_data, |
| 164 [in] str_t entry_key, |
| 165 [in] PP_OpenResourceCompletionCallback callback, |
| 166 [inout] mem_t callback_user_data); |
155 }; | 167 }; |
156 | 168 |
157 /* PPB_NaCl_Private */ | 169 /* PPB_NaCl_Private */ |
158 interface PPB_NaCl_Private { | 170 interface PPB_NaCl_Private { |
159 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success | 171 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success |
160 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on | 172 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on |
161 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface | 173 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface |
162 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag | 174 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag |
163 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. | 175 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. |
164 * This implies that LaunchSelLdr is run from the main thread. If a nexe | 176 * This implies that LaunchSelLdr is run from the main thread. If a nexe |
(...skipping 12 matching lines...) Expand all Loading... |
177 */ | 189 */ |
178 void LaunchSelLdr([in] PP_Instance instance, | 190 void LaunchSelLdr([in] PP_Instance instance, |
179 [in] str_t alleged_url, | 191 [in] str_t alleged_url, |
180 [in] PP_Bool uses_irt, | 192 [in] PP_Bool uses_irt, |
181 [in] PP_Bool uses_ppapi, | 193 [in] PP_Bool uses_ppapi, |
182 [in] PP_Bool uses_nonsfi_mode, | 194 [in] PP_Bool uses_nonsfi_mode, |
183 [in] PP_Bool enable_ppapi_dev, | 195 [in] PP_Bool enable_ppapi_dev, |
184 [in] PP_Bool enable_dyncode_syscalls, | 196 [in] PP_Bool enable_dyncode_syscalls, |
185 [in] PP_Bool enable_exception_handling, | 197 [in] PP_Bool enable_exception_handling, |
186 [in] PP_Bool enable_crash_throttling, | 198 [in] PP_Bool enable_crash_throttling, |
187 [in] PP_ManifestService manifest_service_interface, | 199 [in] PPP_ManifestService manifest_service_interface, |
188 [inout] mem_t manifest_service_user_data, | 200 [inout] mem_t manifest_service_user_data, |
189 [out] mem_t imc_handle, | 201 [out] mem_t imc_handle, |
190 [out] PP_Var error_message, | 202 [out] PP_Var error_message, |
191 [in] PP_CompletionCallback callback); | 203 [in] PP_CompletionCallback callback); |
192 | 204 |
193 /* This function starts the IPC proxy so the nexe can communicate with the | 205 /* This function starts the IPC proxy so the nexe can communicate with the |
194 * browser. | 206 * browser. |
195 */ | 207 */ |
196 PP_Bool StartPpapiProxy(PP_Instance instance); | 208 PP_Bool StartPpapiProxy(PP_Instance instance); |
197 | 209 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 void ProcessNaClManifest([in] PP_Instance instance, | 397 void ProcessNaClManifest([in] PP_Instance instance, |
386 [in] str_t program_url); | 398 [in] str_t program_url); |
387 | 399 |
388 /* Returns the manifest url as passed as a plugin argument. */ | 400 /* Returns the manifest url as passed as a plugin argument. */ |
389 PP_Var GetManifestURLArgument([in] PP_Instance instance); | 401 PP_Var GetManifestURLArgument([in] PP_Instance instance); |
390 | 402 |
391 PP_Bool IsPNaCl([in] PP_Instance instance); | 403 PP_Bool IsPNaCl([in] PP_Instance instance); |
392 | 404 |
393 PP_Bool DevInterfacesEnabled([in] PP_Instance instance); | 405 PP_Bool DevInterfacesEnabled([in] PP_Instance instance); |
394 }; | 406 }; |
OLD | NEW |