| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 struct PP_PNaClOptions { | 147 struct PP_PNaClOptions { |
| 148 PP_Bool translate; | 148 PP_Bool translate; |
| 149 PP_Bool is_debug; | 149 PP_Bool is_debug; |
| 150 int32_t opt_level; | 150 int32_t opt_level; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */ | 153 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */ |
| 154 typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data, | 154 typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data, |
| 155 [in] PP_FileHandle file_handle); | 155 [in] PP_FileHandle file_handle); |
| 156 | 156 |
| 157 /* Corresponds to NaClFileInfo in | 157 /* Corresponds to NaClFileInfo in native_client/src/public/nacl_file_info.h */ |
| 158 * native_client/src/trusted/validator/nacl_file_info.h */ | |
| 159 struct PP_NaClFileInfo { | 158 struct PP_NaClFileInfo { |
| 160 PP_FileHandle handle; | 159 PP_FileHandle handle; |
| 161 | 160 |
| 162 /* See NaClFileToken comment in nacl_file_info.h */ | 161 /* See NaClFileToken comment in nacl_file_info.h */ |
| 163 uint64_t token_lo; | 162 uint64_t token_lo; |
| 164 uint64_t token_hi; | 163 uint64_t token_hi; |
| 165 }; | 164 }; |
| 166 | 165 |
| 166 struct PP_NaClResourceFileHandle { |
| 167 PP_FileHandle handle; |
| 168 |
| 169 /* See NaClFileToken comment in nacl_file_info.h */ |
| 170 uint64_t token_lo; |
| 171 uint64_t token_hi; |
| 172 |
| 173 str_t key; |
| 174 }; |
| 175 |
| 167 /* PPB_NaCl_Private */ | 176 /* PPB_NaCl_Private */ |
| 168 interface PPB_NaCl_Private { | 177 interface PPB_NaCl_Private { |
| 169 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success | 178 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success |
| 170 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on | 179 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on |
| 171 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface | 180 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface |
| 172 * returns 'Dev' interfaces to the NaCl plugin. | 181 * returns 'Dev' interfaces to the NaCl plugin. |
| 173 * The |nexe_file_info| is currently used only in non-SFI mode. It is the | 182 * The |nexe_file_info| is currently used only in non-SFI mode. It is the |
| 174 * file handle for the main nexe file, which should be initially loaded. | 183 * file handle for the main nexe file, which should be initially loaded. |
| 175 * LaunchSelLdr takes the ownership of the file handle. | 184 * LaunchSelLdr takes the ownership of the file handle. |
| 176 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should | 185 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should |
| 177 * be used with the binary pointed by the url. | 186 * be used with the binary pointed by the url. |
| 178 */ | 187 */ |
| 179 void LaunchSelLdr([in] PP_Instance instance, | 188 void LaunchSelLdr([in] PP_Instance instance, |
| 180 [in] PP_Bool main_service_runtime, | 189 [in] PP_Bool main_service_runtime, |
| 181 [in] str_t alleged_url, | 190 [in] str_t alleged_url, |
| 182 [in] PP_NaClFileInfo nexe_file_info, | 191 [in] PP_NaClFileInfo nexe_file_info, |
| 192 [in] PP_NaClResourceFileHandle[] resource_file_handles, |
| 183 [in] PP_Bool uses_nonsfi_mode, | 193 [in] PP_Bool uses_nonsfi_mode, |
| 184 [in] PP_Bool enable_ppapi_dev, | 194 [in] PP_Bool enable_ppapi_dev, |
| 185 [in] PP_NaClAppProcessType process_type, | 195 [in] PP_NaClAppProcessType process_type, |
| 186 [out] mem_t imc_handle, | 196 [out] mem_t imc_handle, |
| 187 [in] PP_CompletionCallback callback); | 197 [in] PP_CompletionCallback callback); |
| 188 | 198 |
| 189 /* This function starts the IPC proxy so the nexe can communicate with the | 199 /* This function starts the IPC proxy so the nexe can communicate with the |
| 190 * browser. | 200 * browser. |
| 191 */ | 201 */ |
| 192 PP_Bool StartPpapiProxy(PP_Instance instance); | 202 PP_Bool StartPpapiProxy(PP_Instance instance); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr | 346 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr |
| 337 PP_Var GetCpuFeatureAttrs(); | 347 PP_Var GetCpuFeatureAttrs(); |
| 338 | 348 |
| 339 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| | 349 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| |
| 340 * to information for a handle to a file containing its contents. | 350 * to information for a handle to a file containing its contents. |
| 341 * If metadata for identity-based validation caching is available | 351 * If metadata for identity-based validation caching is available |
| 342 * then it sets token information in |file_info| (otherwise left untouched). | 352 * then it sets token information in |file_info| (otherwise left untouched). |
| 343 */ | 353 */ |
| 344 void DownloadNexe([in] PP_Instance instance, | 354 void DownloadNexe([in] PP_Instance instance, |
| 345 [in] str_t url, | 355 [in] str_t url, |
| 356 [in] PP_Bool download_resource_files, |
| 346 [out] PP_NaClFileInfo file_info, | 357 [out] PP_NaClFileInfo file_info, |
| 358 [out] PP_NaClResourceFileHandle[] resource_file_handles, |
| 347 [in] PP_CompletionCallback callback); | 359 [in] PP_CompletionCallback callback); |
| 348 | 360 |
| 349 /* Reports the status of sel_ldr for UMA reporting. | 361 /* Reports the status of sel_ldr for UMA reporting. |
| 350 * |max_status| has to be provided because the implementation of this | 362 * |max_status| has to be provided because the implementation of this |
| 351 * interface can't access the NaClErrorCode enum. | 363 * interface can't access the NaClErrorCode enum. |
| 352 */ | 364 */ |
| 353 void ReportSelLdrStatus([in] PP_Instance instance, | 365 void ReportSelLdrStatus([in] PP_Instance instance, |
| 354 [in] int32_t load_status, | 366 [in] int32_t load_status, |
| 355 [in] int32_t max_status); | 367 [in] int32_t max_status); |
| 356 | 368 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 383 * Otherwise, |stream_callback| is called repeatedly with blocks of data | 395 * Otherwise, |stream_callback| is called repeatedly with blocks of data |
| 384 * as they are received. |stream_finished_callback| is called after all | 396 * as they are received. |stream_finished_callback| is called after all |
| 385 * data has been received and dispatched to |stream_callback|. | 397 * data has been received and dispatched to |stream_callback|. |
| 386 */ | 398 */ |
| 387 void StreamPexe([in] PP_Instance instance, | 399 void StreamPexe([in] PP_Instance instance, |
| 388 [in] str_t pexe_url, | 400 [in] str_t pexe_url, |
| 389 [in] int32_t opt_level, | 401 [in] int32_t opt_level, |
| 390 [in] PPP_PexeStreamHandler stream_handler, | 402 [in] PPP_PexeStreamHandler stream_handler, |
| 391 [inout] mem_t stream_handler_user_data); | 403 [inout] mem_t stream_handler_user_data); |
| 392 }; | 404 }; |
| OLD | NEW |