| Index: components/nacl/common/nacl_types.h
|
| diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h
|
| index 490ec64118976a107658063963ba4015eae803e6..69369eaeab8b9cc24bf9b164ac9003edd34a6dd4 100644
|
| --- a/components/nacl/common/nacl_types.h
|
| +++ b/components/nacl/common/nacl_types.h
|
| @@ -6,6 +6,7 @@
|
| #define COMPONENTS_NACL_COMMON_NACL_TYPES_H_
|
|
|
| #include <string>
|
| +#include <utility>
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| @@ -62,10 +63,23 @@ struct NaClStartParams {
|
| NaClStartParams();
|
| ~NaClStartParams();
|
|
|
| + struct ResourceFileInfo {
|
| + ResourceFileInfo();
|
| + ResourceFileInfo(IPC::PlatformFileForTransit file,
|
| + const base::FilePath& file_path,
|
| + const std::string& file_key);
|
| + ~ResourceFileInfo();
|
| +
|
| + IPC::PlatformFileForTransit file;
|
| + base::FilePath file_path;
|
| + std::string file_key;
|
| + };
|
| +
|
| IPC::PlatformFileForTransit nexe_file;
|
| uint64_t nexe_token_lo;
|
| uint64_t nexe_token_hi;
|
|
|
| + std::vector<ResourceFileInfo> resource_files;
|
| std::vector<FileDescriptor> handles;
|
| FileDescriptor debug_stub_server_bound_socket;
|
|
|
| @@ -94,17 +108,35 @@ struct NaClStartParams {
|
| // If you change this, you will also need to update the IPC serialization in
|
| // nacl_host_messages.h.
|
| struct NaClLaunchParams {
|
| + struct ResourceFileInfo;
|
| NaClLaunchParams();
|
| - 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_nonsfi_mode,
|
| - NaClAppProcessType process_type);
|
| + NaClLaunchParams(
|
| + const std::string& manifest_url,
|
| + const IPC::PlatformFileForTransit& nexe_file,
|
| + uint64_t nexe_token_lo,
|
| + uint64_t nexe_token_hi,
|
| + const std::vector<ResourceFileInfo>& resource_files,
|
| + int render_view_id,
|
| + uint32 permission_bits,
|
| + bool uses_nonsfi_mode,
|
| + NaClAppProcessType process_type);
|
| ~NaClLaunchParams();
|
|
|
| + struct ResourceFileInfo {
|
| + ResourceFileInfo();
|
| + ResourceFileInfo(IPC::PlatformFileForTransit file,
|
| + uint64_t file_token_lo,
|
| + uint64_t file_token_hi,
|
| + const std::string& file_key);
|
| + ~ResourceFileInfo();
|
| +
|
| + IPC::PlatformFileForTransit file;
|
| + uint64_t file_token_lo;
|
| + uint64_t file_token_hi;
|
| + // This corresponds to a key in the "files" section of the NMF file.
|
| + std::string file_key;
|
| + };
|
| +
|
| 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
|
| @@ -112,6 +144,7 @@ struct NaClLaunchParams {
|
| IPC::PlatformFileForTransit nexe_file;
|
| uint64_t nexe_token_lo;
|
| uint64_t nexe_token_hi;
|
| + std::vector<ResourceFileInfo> resource_files_info;
|
|
|
| int render_view_id;
|
| uint32 permission_bits;
|
| @@ -152,6 +185,29 @@ struct NaClLaunchResult {
|
| base::SharedMemoryHandle crash_info_shmem_handle;
|
| };
|
|
|
| +struct NaClOpenExecutableResult {
|
| + struct FileInfo;
|
| + NaClOpenExecutableResult();
|
| + NaClOpenExecutableResult(const FileInfo& file_info,
|
| + const std::vector<FileInfo>& resource_files_info);
|
| + ~NaClOpenExecutableResult();
|
| +
|
| + struct FileInfo {
|
| + FileInfo();
|
| + FileInfo(IPC::PlatformFileForTransit file,
|
| + uint64_t file_token_lo,
|
| + uint64_t file_token_hi);
|
| + ~FileInfo();
|
| +
|
| + IPC::PlatformFileForTransit file;
|
| + uint64_t file_token_lo;
|
| + uint64_t file_token_hi;
|
| + };
|
| +
|
| + FileInfo file_info;
|
| + std::vector<FileInfo> resource_files_info;
|
| +};
|
| +
|
| } // namespace nacl
|
|
|
| #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_
|
|
|