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); |
}; |