| 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 COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
| 6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Sends the reply message to the renderer. Either result or | 138 // Sends the reply message to the renderer. Either result or |
| 139 // error message must be empty. | 139 // error message must be empty. |
| 140 void SendMessageToRenderer(const NaClLaunchResult& result, | 140 void SendMessageToRenderer(const NaClLaunchResult& result, |
| 141 const std::string& error_message); | 141 const std::string& error_message); |
| 142 | 142 |
| 143 // Sends the message to the NaCl process to load the plugin. Returns true | 143 // Sends the message to the NaCl process to load the plugin. Returns true |
| 144 // on success. | 144 // on success. |
| 145 bool StartNaClExecution(); | 145 bool StartNaClExecution(); |
| 146 | 146 |
| 147 void StartNaClFileResolved( |
| 148 NaClStartParams params, |
| 149 const base::FilePath& file_path, |
| 150 base::File nexe_file); |
| 151 |
| 147 // Does post-process-launching tasks for starting the NaCl process once | 152 // Does post-process-launching tasks for starting the NaCl process once |
| 148 // we have a connection. | 153 // we have a connection. |
| 149 // | 154 // |
| 150 // Returns false on failure. | 155 // Returns false on failure. |
| 151 bool StartWithLaunchedProcess(); | 156 bool StartWithLaunchedProcess(); |
| 152 | 157 |
| 153 // Message handlers for validation caching. | 158 // Message handlers for validation caching. |
| 154 void OnQueryKnownToValidate(const std::string& signature, bool* result); | 159 void OnQueryKnownToValidate(const std::string& signature, bool* result); |
| 155 void OnSetKnownToValidate(const std::string& signature); | 160 void OnSetKnownToValidate(const std::string& signature); |
| 156 void OnResolveFileToken(uint64 file_token_lo, uint64 file_token_hi, | 161 void OnResolveFileToken(uint64 file_token_lo, uint64 file_token_hi); |
| 157 IPC::Message* reply_msg); | 162 void FileResolved(uint64_t file_token_lo, |
| 158 void OnResolveFileTokenAsync(uint64 file_token_lo, uint64 file_token_hi); | 163 uint64_t file_token_hi, |
| 159 void FileResolved(const base::FilePath& file_path, | 164 const base::FilePath& file_path, |
| 160 IPC::Message* reply_msg, | |
| 161 base::File file); | 165 base::File file); |
| 162 void FileResolvedAsync(uint64_t file_token_lo, | |
| 163 uint64_t file_token_hi, | |
| 164 const base::FilePath& file_path, | |
| 165 base::File file); | |
| 166 #if defined(OS_WIN) | 166 #if defined(OS_WIN) |
| 167 // Message handler for Windows hardware exception handling. | 167 // Message handler for Windows hardware exception handling. |
| 168 void OnAttachDebugExceptionHandler(const std::string& info, | 168 void OnAttachDebugExceptionHandler(const std::string& info, |
| 169 IPC::Message* reply_msg); | 169 IPC::Message* reply_msg); |
| 170 bool AttachDebugExceptionHandler(const std::string& info, | 170 bool AttachDebugExceptionHandler(const std::string& info, |
| 171 IPC::Message* reply_msg); | 171 IPC::Message* reply_msg); |
| 172 #endif | 172 #endif |
| 173 | 173 |
| 174 // Called when the PPAPI IPC channels to the browser/renderer have been | 174 // Called when the PPAPI IPC channels to the browser/renderer have been |
| 175 // created. | 175 // created. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 base::File socket_for_sel_ldr_; | 236 base::File socket_for_sel_ldr_; |
| 237 | 237 |
| 238 base::WeakPtrFactory<NaClProcessHost> weak_factory_; | 238 base::WeakPtrFactory<NaClProcessHost> weak_factory_; |
| 239 | 239 |
| 240 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 240 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace nacl | 243 } // namespace nacl |
| 244 | 244 |
| 245 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 245 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
| OLD | NEW |