Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / components / nacl / common / nacl_types.h
index a4759b1..6aea090 100644 (file)
@@ -12,6 +12,7 @@
 #include "base/process/process_handle.h"
 #include "build/build_config.h"
 #include "ipc/ipc_channel.h"
+#include "ipc/ipc_platform_file.h"
 
 #if defined(OS_POSIX)
 #include "base/file_descriptor_posix.h"
@@ -42,6 +43,10 @@ struct NaClStartParams {
   NaClStartParams();
   ~NaClStartParams();
 
+  IPC::PlatformFileForTransit nexe_file;
+  uint64_t nexe_token_lo;
+  uint64_t nexe_token_hi;
+
   std::vector<FileDescriptor> handles;
   FileDescriptor debug_stub_server_bound_socket;
 
@@ -57,6 +62,7 @@ struct NaClStartParams {
   bool enable_ipc_proxy;
   bool uses_irt;
   bool enable_dyncode_syscalls;
+
   // NOTE: Any new fields added here must also be added to the IPC
   // serialization in nacl_messages.h and (for POD fields) the constructor
   // in nacl_types.cc.
@@ -68,16 +74,27 @@ struct NaClStartParams {
 // nacl_host_messages.h.
 struct NaClLaunchParams {
   NaClLaunchParams();
-  NaClLaunchParams(const std::string& u, int r, uint32 p,
+  NaClLaunchParams(const std::string& manifest_url,
+                   const IPC::PlatformFileForTransit& nexe_file,
+                   uint64_t nexe_token_lo,
+                   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);
-  NaClLaunchParams(const NaClLaunchParams& l);
   ~NaClLaunchParams();
 
   std::string manifest_url;
+  // On Windows, the HANDLE passed here is valid in the renderer's context.
+  // It's the responsibility of the browser to duplicate this handle properly
+  // for passing it to the plugin.
+  IPC::PlatformFileForTransit nexe_file;
+  uint64_t nexe_token_lo;
+  uint64_t nexe_token_hi;
+
   int render_view_id;
   uint32 permission_bits;
   bool uses_irt;