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

Unified Diff: components/nacl/browser/nacl_file_host.h

Issue 2514323004: Convert NaCl renderer-browser messages to mojo. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « components/nacl/browser/bad_message.cc ('k') | components/nacl/browser/nacl_file_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/nacl/browser/bad_message.cc ('k') | components/nacl/browser/nacl_file_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698