Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: components/nacl/common/nacl_types.h

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win x64 Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..578524a27ad72afb7dd32759ffef6d32196ddb58 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_metadata,
+ const std::string& file_key);
+ ~ResourceFileInfo();
+
+ IPC::PlatformFileForTransit file;
+ base::FilePath file_path_metadata;
teravest 2014/11/10 20:36:11 Documenting the intended use for file_path_metadat
Yusuke Sato 2014/11/11 00:58:35 Done. I think I used the suffix to make the varia
+ 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,34 @@ 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;
+ std::string file_key;
teravest 2014/11/10 20:36:11 I think it's worth adding a comment that file_key
Yusuke Sato 2014/11/11 00:58:35 Good idea. Done.
+ };
+
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 +143,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 +184,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_

Powered by Google App Engine
This is Rietveld 408576698