Chromium Code Reviews| 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..f075b0fbe370e1a8b0535d55eda8529bff0199f6 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,26 +15,19 @@ 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. |
| @@ -43,11 +36,13 @@ bool PnaclCanOpenFile(const std::string& filename, |
| // Opens a NaCl executable file for reading and executing. |
| 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, |
|
tibell
2017/01/31 01:24:12
Could you document what |origin_task_runner| is fo
Sam McNally
2017/02/07 00:13:18
Done.
|
| + const OpenFileCallback& callback); |
| } // namespace nacl_file_host |