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