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_PNACL_FILE_HOST_H_ | |
6 #define CHROME_BROWSER_NACL_HOST_PNACL_FILE_HOST_H_ | |
7 | |
8 #include <string> | |
9 | |
10 class ChromeRenderMessageFilter; | |
11 | |
12 namespace base { | |
13 class FilePath; | |
14 } | |
15 | |
16 namespace IPC { | |
17 class Message; | |
18 } // namespace IPC | |
19 | |
20 // Opens Pnacl Files in the Browser process, on behalf of the NaCl plugin. | |
21 | |
22 namespace pnacl_file_host { | |
23 | |
24 // Open a Pnacl file (readonly) on behalf of the NaCl plugin. | |
25 void GetReadonlyPnaclFd(ChromeRenderMessageFilter* chrome_render_message_filter, | |
26 const std::string& filename, | |
27 IPC::Message* reply_msg); | |
28 | |
29 // Return true if the filename requested is valid for opening. | |
30 // Sets file_to_open to the base::FilePath which we will attempt to open. | |
31 bool PnaclCanOpenFile(const std::string& filename, | |
32 base::FilePath* file_to_open); | |
33 | |
34 // Creates a temporary file that will be deleted when the last handle | |
35 // is closed, or earlier. | |
36 void CreateTemporaryFile( | |
37 ChromeRenderMessageFilter* chrome_render_message_filter, | |
38 IPC::Message* reply_msg); | |
39 | |
40 } // namespace pnacl_file_host | |
41 | |
42 #endif // CHROME_BROWSER_NACL_HOST_PNACL_FILE_HOST_H_ | |
OLD | NEW |