Index: components/nacl/browser/nacl_file_host.h |
diff --git a/components/nacl/browser/nacl_file_host.h b/components/nacl/browser/nacl_file_host.h |
index 04ac621525900ea1637dd86bd6871be8c05dd9de..b67f7878c3e20bfa406db059d689f739a33d40ba 100644 |
--- a/components/nacl/browser/nacl_file_host.h |
+++ b/components/nacl/browser/nacl_file_host.h |
@@ -7,7 +7,7 @@ |
#include <string> |
-#include "base/memory/ref_counted.h" |
+#include "components/nacl/common/nacl.mojom.h" |
class GURL; |
@@ -15,39 +15,35 @@ namespace base { |
class FilePath; |
} |
-namespace IPC { |
-class Message; |
-} |
- |
-namespace nacl { |
-class NaClHostMessageFilter; |
-} |
- |
// Opens NaCl Files in the Browser process, on behalf of the NaCl plugin. |
namespace nacl_file_host { |
+using OpenFileCallback = |
+ base::Callback<void(base::File, uint64_t token_lo, uint64_t token_hi)>; |
+ |
// Open a PNaCl file (readonly) on behalf of the NaCl plugin. |
// If it is executable, registers the executable for validation caching. |
// Otherwise, just opens the file read-only. |
-void GetReadonlyPnaclFd( |
- scoped_refptr<nacl::NaClHostMessageFilter> nacl_host_message_filter, |
- const std::string& filename, |
- bool is_executable, |
- IPC::Message* reply_msg); |
+void GetReadonlyPnaclFd(const std::string& filename, |
+ bool is_executable, |
+ const OpenFileCallback& callback); |
// Return true if the filename requested is valid for opening. |
// Sets file_to_open to the base::FilePath which we will attempt to open. |
bool PnaclCanOpenFile(const std::string& filename, |
base::FilePath* file_to_open); |
-// Opens a NaCl executable file for reading and executing. |
+// Opens a NaCl executable file for reading and executing. |callback| will be |
+// invoked on |origin_task_runner| with the result. |
void OpenNaClExecutable( |
- scoped_refptr<nacl::NaClHostMessageFilter> nacl_host_message_filter, |
int render_view_id, |
const GURL& file_url, |
bool enable_validation_caching, |
- IPC::Message* reply_msg); |
+ int render_process_id, |
+ const base::FilePath& profile_directory, |
+ const scoped_refptr<base::TaskRunner>& origin_task_runner, |
+ const OpenFileCallback& callback); |
} // namespace nacl_file_host |