| 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_NACL_FILE_HOST_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ |
| 6 #define CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 | 11 |
| 12 class ChromeRenderMessageFilter; | |
| 13 class ExtensionInfoMap; | 12 class ExtensionInfoMap; |
| 14 class GURL; | 13 class GURL; |
| 14 class NaClHostMessageFilter; |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class FilePath; | 17 class FilePath; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace IPC { | 20 namespace IPC { |
| 21 class Message; | 21 class Message; |
| 22 } | 22 } |
| 23 | 23 |
| 24 // Opens NaCl Files in the Browser process, on behalf of the NaCl plugin. | 24 // Opens NaCl Files in the Browser process, on behalf of the NaCl plugin. |
| 25 | 25 |
| 26 namespace nacl_file_host { | 26 namespace nacl_file_host { |
| 27 | 27 |
| 28 // Open a Pnacl file (readonly) on behalf of the NaCl plugin. | 28 // Open a Pnacl file (readonly) on behalf of the NaCl plugin. |
| 29 void GetReadonlyPnaclFd( | 29 void GetReadonlyPnaclFd( |
| 30 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter, | 30 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, |
| 31 const std::string& filename, | 31 const std::string& filename, |
| 32 IPC::Message* reply_msg); | 32 IPC::Message* reply_msg); |
| 33 | 33 |
| 34 // Return true if the filename requested is valid for opening. | 34 // Return true if the filename requested is valid for opening. |
| 35 // Sets file_to_open to the base::FilePath which we will attempt to open. | 35 // Sets file_to_open to the base::FilePath which we will attempt to open. |
| 36 bool PnaclCanOpenFile(const std::string& filename, | 36 bool PnaclCanOpenFile(const std::string& filename, |
| 37 base::FilePath* file_to_open); | 37 base::FilePath* file_to_open); |
| 38 | 38 |
| 39 // Creates a temporary file that will be deleted when the last handle | 39 // Creates a temporary file that will be deleted when the last handle |
| 40 // is closed, or earlier. | 40 // is closed, or earlier. |
| 41 void CreateTemporaryFile( | 41 void CreateTemporaryFile( |
| 42 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter, | 42 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, |
| 43 IPC::Message* reply_msg); | 43 IPC::Message* reply_msg); |
| 44 | 44 |
| 45 // Opens a NaCl executable file for reading and executing. | 45 // Opens a NaCl executable file for reading and executing. |
| 46 void OpenNaClExecutable( | 46 void OpenNaClExecutable( |
| 47 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter, | 47 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, |
| 48 scoped_refptr<ExtensionInfoMap> extension_info_map, | 48 scoped_refptr<ExtensionInfoMap> extension_info_map, |
| 49 int render_view_id, | 49 int render_view_id, |
| 50 const GURL& file_url, | 50 const GURL& file_url, |
| 51 IPC::Message* reply_msg); | 51 IPC::Message* reply_msg); |
| 52 | 52 |
| 53 } // namespace nacl_file_host | 53 } // namespace nacl_file_host |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ | 55 #endif // CHROME_BROWSER_NACL_HOST_NACL_FILE_HOST_H_ |
| OLD | NEW |