Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / nacl / common / nacl_types.h
index 7ce6b3f..490ec64 100644 (file)
@@ -43,6 +43,20 @@ inline int ToNativeHandle(const FileDescriptor& desc) {
 static const int kNaClCrashInfoShmemSize = 4096;
 static const int kNaClCrashInfoMaxLogSize = 1024;
 
+// Types of untrusted NaCl processes.
+enum NaClAppProcessType {
+  kUnknownNaClProcessType,
+  // Runs user-provided *native* code. Enabled for Chrome Web Store apps.
+  kNativeNaClProcessType,
+  // Runs user-provided code that is translated from *bitcode* by an
+  // in-browser PNaCl translator.
+  kPNaClProcessType,
+  // Runs pnacl-llc/linker *native* code. These nexes are browser-provided
+  // (not user-provided).
+  kPNaClTranslatorProcessType,
+  kNumNaClProcessTypes
+};
+
 // Parameters sent to the NaCl process when we start it.
 struct NaClStartParams {
   NaClStartParams();
@@ -62,11 +76,10 @@ struct NaClStartParams {
   // executable or DLL.
   std::string version;
 
-  bool enable_exception_handling;
   bool enable_debug_stub;
   bool enable_ipc_proxy;
-  bool uses_irt;
-  bool enable_dyncode_syscalls;
+
+  NaClAppProcessType process_type;
 
   // For NaCl <-> renderer crash information reporting.
   base::SharedMemoryHandle crash_info_shmem_handle;
@@ -88,11 +101,8 @@ struct NaClLaunchParams {
                    uint64_t nexe_token_hi,
                    int render_view_id,
                    uint32 permission_bits,
-                   bool uses_irt,
                    bool uses_nonsfi_mode,
-                   bool enable_dyncode_syscalls,
-                   bool enable_exception_handling,
-                   bool enable_crash_throttling);
+                   NaClAppProcessType process_type);
   ~NaClLaunchParams();
 
   std::string manifest_url;
@@ -105,11 +115,9 @@ struct NaClLaunchParams {
 
   int render_view_id;
   uint32 permission_bits;
-  bool uses_irt;
   bool uses_nonsfi_mode;
-  bool enable_dyncode_syscalls;
-  bool enable_exception_handling;
-  bool enable_crash_throttling;
+
+  NaClAppProcessType process_type;
 };
 
 struct NaClLaunchResult {