| 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_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_NACL_HOST_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_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 void OnResourcesReady(); | 117 void OnResourcesReady(); |
| 118 | 118 |
| 119 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer. | 119 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer. |
| 120 bool enable_ppapi_proxy() { return render_view_id_ != 0; } | 120 bool enable_ppapi_proxy() { return render_view_id_ != 0; } |
| 121 | 121 |
| 122 // Sends the reply message to the renderer who is waiting for the plugin | 122 // Sends the reply message to the renderer who is waiting for the plugin |
| 123 // to load. Returns true on success. | 123 // to load. Returns true on success. |
| 124 bool ReplyToRenderer(const IPC::ChannelHandle& channel_handle); | 124 bool ReplyToRenderer(const IPC::ChannelHandle& channel_handle); |
| 125 | 125 |
| 126 // Sends the reply with error message to the renderer. |
| 127 void SendErrorToRenderer(const std::string& error_message); |
| 128 |
| 126 // Sends the message to the NaCl process to load the plugin. Returns true | 129 // Sends the message to the NaCl process to load the plugin. Returns true |
| 127 // on success. | 130 // on success. |
| 128 bool StartNaClExecution(); | 131 bool StartNaClExecution(); |
| 129 | 132 |
| 130 // Called once all initialization is complete and the NaCl process is | 133 // Called once all initialization is complete and the NaCl process is |
| 131 // ready to go. Returns true on success. | 134 // ready to go. Returns true on success. |
| 132 bool SendStart(); | 135 bool SendStart(); |
| 133 | 136 |
| 134 // Does post-process-launching tasks for starting the NaCl process once | 137 // Does post-process-launching tasks for starting the NaCl process once |
| 135 // we have a connection. | 138 // we have a connection. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 PluginListener ipc_plugin_listener_; | 210 PluginListener ipc_plugin_listener_; |
| 208 // Browser host for plugin process. | 211 // Browser host for plugin process. |
| 209 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; | 212 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; |
| 210 | 213 |
| 211 int render_view_id_; | 214 int render_view_id_; |
| 212 | 215 |
| 213 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 216 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 214 }; | 217 }; |
| 215 | 218 |
| 216 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 219 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| OLD | NEW |