PP_NACL_MANIFEST_MISSING_ARCH = 0
};
+/** Event types that NaCl may use when reporting load progress or errors. */
+enum PP_NaClEventType {
+ PP_NACL_EVENT_LOADSTART,
+ PP_NACL_EVENT_PROGRESS,
+ PP_NACL_EVENT_ERROR,
+ PP_NACL_EVENT_ABORT,
+ PP_NACL_EVENT_LOAD,
+ PP_NACL_EVENT_LOADEND,
+ PP_NACL_EVENT_CRASH
+};
+
/* PPB_NaCl_Private */
interface PPB_NaCl_Private {
/* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
* the nexe contribute to crash throttling statisics and whether nexe starts
* are throttled by crash throttling.
*/
- PP_ExternalPluginResult LaunchSelLdr([in] PP_Instance instance,
- [in] str_t alleged_url,
- [in] PP_Bool uses_irt,
- [in] PP_Bool uses_ppapi,
- [in] PP_Bool enable_ppapi_dev,
- [in] PP_Bool enable_dyncode_syscalls,
- [in] PP_Bool enable_exception_handling,
- [in] PP_Bool enable_crash_throttling,
- [out] mem_t imc_handle,
- [out] PP_Var error_message);
+ void LaunchSelLdr([in] PP_Instance instance,
+ [in] str_t alleged_url,
+ [in] PP_Bool uses_irt,
+ [in] PP_Bool uses_ppapi,
+ [in] PP_Bool enable_ppapi_dev,
+ [in] PP_Bool enable_dyncode_syscalls,
+ [in] PP_Bool enable_exception_handling,
+ [in] PP_Bool enable_crash_throttling,
+ [out] mem_t imc_handle,
+ [out] PP_Var error_message,
+ [in] PP_CompletionCallback callback);
/* This function starts the IPC proxy so the nexe can communicate with the
* browser. Returns PP_EXTERNAL_PLUGIN_OK on success, otherwise a result code
*/
PP_FileHandle CreateTemporaryFile([in] PP_Instance instance);
+ /* Return the number of processors in the system as reported by the OS */
+ int32_t GetNumberOfProcessors();
+
/* Create a temporary file, which will be deleted by the time the
* last handle is closed (or earlier on POSIX systems), to use for
* the nexe with the cache information given by |pexe_url|,
[in] str_t last_modified,
[in] str_t etag,
[in] PP_Bool has_no_store_header,
+ [in] str_t sandbox_isa,
+ [in] str_t extra_flags,
[out] PP_Bool is_hit,
[out] PP_FileHandle nexe_handle,
[in] PP_CompletionCallback callback);
void ReportTranslationFinished([in] PP_Instance instance,
[in] PP_Bool success);
- /* Return true if we are off the record.
- */
- PP_Bool IsOffTheRecord();
-
/* Display a UI message to the user. */
PP_ExternalPluginResult ReportNaClError([in] PP_Instance instance,
[in] PP_NaClError message_id);
[in] str_t file_url,
[out] uint64_t file_token_lo,
[out] uint64_t file_token_hi);
+
+
+ /* Dispatch a progress event on the DOM element where the given instance is
+ * embedded.
+ */
+ void DispatchEvent([in] PP_Instance instance,
+ [in] PP_NaClEventType event_type,
+ [in] str_t resource_url,
+ [in] PP_Bool length_is_computable,
+ [in] uint64_t loaded_bytes,
+ [in] uint64_t total_bytes);
+
+ /* Sets a read-only property on the <embed> DOM element that corresponds to
+ * the given instance.
+ */
+ void SetReadOnlyProperty([in] PP_Instance instance,
+ [in] PP_Var key,
+ [in] PP_Var value);
};