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

Unified Diff: components/nacl/loader/nacl_listener.h

Issue 728113002: obsolete: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.h
diff --git a/components/nacl/loader/nacl_listener.h b/components/nacl/loader/nacl_listener.h
index 9e8d67b65747d96b35f3391e7bb95a22faf55f0a..3ed992b046c9ef1b8d77cc600408e6985e71df39 100644
--- a/components/nacl/loader/nacl_listener.h
+++ b/components/nacl/loader/nacl_listener.h
@@ -5,6 +5,7 @@
#ifndef CHROME_NACL_NACL_LISTENER_H_
#define CHROME_NACL_NACL_LISTENER_H_
+#include <map>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -61,6 +62,14 @@ class NaClListener : public IPC::Listener {
private:
bool OnMessageReceived(const IPC::Message& msg) override;
+ typedef base::Callback<void(const IPC::Message&,
+ IPC::PlatformFileForTransit,
+ base::FilePath)> OpenResourceReplyCallback;
+
+ bool OnOpenResource(const IPC::Message& msg,
+ const std::string& key,
+ OpenResourceReplyCallback cb);
+
void OnStart(const nacl::NaClStartParams& params);
// A channel back to the browser.
@@ -93,6 +102,11 @@ class NaClListener : public IPC::Listener {
// Used to identify what thread we're on.
base::MessageLoop* main_loop_;
+ // Pre-opened resource descriptors.
+ std::map<
+ std::string, // key
+ std::pair<IPC::PlatformFileForTransit, base::FilePath> > resource_files_;
+
DISALLOW_COPY_AND_ASSIGN(NaClListener);
};
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698