Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ppapi / api / private / ppb_nacl_private.idl
index 7a52372..718b749 100644 (file)
@@ -24,6 +24,17 @@ enum PP_NaClError {
   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
@@ -43,16 +54,17 @@ interface PPB_NaCl_Private {
    * 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
@@ -98,6 +110,9 @@ interface PPB_NaCl_Private {
    */
   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|,
@@ -119,6 +134,8 @@ interface PPB_NaCl_Private {
                     [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);
@@ -135,10 +152,6 @@ interface PPB_NaCl_Private {
   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);
@@ -151,4 +164,22 @@ interface PPB_NaCl_Private {
                                    [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);
 };