OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ | |
6 #define CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 | |
12 class GURL; | |
13 class NaClHostMessageFilter; | |
14 | |
15 namespace base { | |
16 class FilePath; | |
17 } | |
18 | |
19 namespace IPC { | |
20 class Message; | |
21 } | |
22 | |
23 // Opens NaCl Files in the Browser process, on behalf of the NaCl plugin. | |
24 | |
25 namespace nacl_file_host { | |
26 | |
27 // Open a PNaCl file (readonly) on behalf of the NaCl plugin. | |
28 void GetReadonlyPnaclFd( | |
29 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, | |
30 const std::string& filename, | |
31 IPC::Message* reply_msg); | |
32 | |
33 // Return true if the filename requested is valid for opening. | |
34 // Sets file_to_open to the base::FilePath which we will attempt to open. | |
35 bool PnaclCanOpenFile(const std::string& filename, | |
36 base::FilePath* file_to_open); | |
37 | |
38 // Opens a NaCl executable file for reading and executing. | |
39 void OpenNaClExecutable( | |
40 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, | |
41 int render_view_id, | |
42 const GURL& file_url, | |
43 IPC::Message* reply_msg); | |
44 | |
45 } // namespace nacl_file_host | |
46 | |
47 #endif // CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ | |
OLD | NEW |