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

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: code review Created 6 years, 2 months 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 0a15d7b521f712d2d25b06ce246ce6501850baec..7fa56773e5471addef48d117b8eb405d18a488aa 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"
@@ -66,6 +67,10 @@ struct NaClStartParams {
// Used only as a key for validation caching.
base::FilePath nexe_file_path_metadata;
+ std::vector<IPC::PlatformFileForTransit> resource_files;
+ std::vector<std::string> resource_keys;
+ // TODO(yusukes): Add |resource_files_metadata| for SFI-NaCl.
+
std::vector<FileDescriptor> handles;
FileDescriptor debug_stub_server_bound_socket;
@@ -95,14 +100,18 @@ struct NaClStartParams {
// nacl_host_messages.h.
struct NaClLaunchParams {
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<IPC::PlatformFileForTransit>& resource_files,
+ const std::vector<std::pair<uint64_t, uint64_t> >& resource_file_tokens,
+ const std::vector<std::string>& resource_keys,
+ int render_view_id,
+ uint32 permission_bits,
+ bool uses_nonsfi_mode,
+ NaClAppProcessType process_type);
~NaClLaunchParams();
std::string manifest_url;
@@ -113,6 +122,10 @@ struct NaClLaunchParams {
uint64_t nexe_token_lo;
uint64_t nexe_token_hi;
+ std::vector<IPC::PlatformFileForTransit> resource_files;
+ std::vector<std::pair<uint64_t, uint64_t> > resource_file_tokens;
+ std::vector<std::string> resource_keys;
+
int render_view_id;
uint32 permission_bits;
bool uses_nonsfi_mode;
@@ -152,6 +165,23 @@ struct NaClLaunchResult {
base::SharedMemoryHandle crash_info_shmem_handle;
};
+struct NaClOpenExecutableResult {
+ NaClOpenExecutableResult();
+ NaClOpenExecutableResult(
+ IPC::PlatformFileForTransit file,
+ uint64_t file_token_lo,
+ uint64_t file_token_hi,
+ const std::vector<IPC::PlatformFileForTransit>& resource_files,
+ const std::vector<std::pair<uint64_t, uint64_t> >& resource_file_tokens);
+ ~NaClOpenExecutableResult();
+
+ IPC::PlatformFileForTransit file;
+ uint64_t file_token_lo;
+ uint64_t file_token_hi;
+ std::vector<IPC::PlatformFileForTransit> resource_files;
+ std::vector<std::pair<uint64_t, uint64_t> > resource_file_tokens;
+};
+
} // namespace nacl
#endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_

Powered by Google App Engine
This is Rietveld 408576698