| OLD | NEW |
| 1 // -*- c++ -*- | 1 // -*- c++ -*- |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 // The portable representation of an instance and root scriptable object. | 6 // The portable representation of an instance and root scriptable object. |
| 7 // The PPAPI version of the plugin instantiates a subclass of this class. | 7 // The PPAPI version of the plugin instantiates a subclass of this class. |
| 8 | 8 |
| 9 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ | 9 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ |
| 10 #define COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ | 10 #define COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // event handlers should block until the module is ready before | 73 // event handlers should block until the module is ready before |
| 74 // trying to communicate with it, i.e., until nacl_ready_state is | 74 // trying to communicate with it, i.e., until nacl_ready_state is |
| 75 // DONE. | 75 // DONE. |
| 76 // | 76 // |
| 77 // NB: currently we do not time out, so if the untrusted code | 77 // NB: currently we do not time out, so if the untrusted code |
| 78 // does not signal that it is ready, then we will deadlock the main | 78 // does not signal that it is ready, then we will deadlock the main |
| 79 // thread of the renderer on this subsequent event delivery. We | 79 // thread of the renderer on this subsequent event delivery. We |
| 80 // should include a time-out at which point we declare the | 80 // should include a time-out at which point we declare the |
| 81 // nacl_ready_state to be done, and let the normal crash detection | 81 // nacl_ready_state to be done, and let the normal crash detection |
| 82 // mechanism(s) take over. | 82 // mechanism(s) take over. |
| 83 // Please note that a call to this function takes over ownership of the |
| 84 // file_info pointer. |
| 83 void LoadNaClModule(PP_NaClFileInfo file_info, | 85 void LoadNaClModule(PP_NaClFileInfo file_info, |
| 84 bool uses_nonsfi_mode, | 86 bool uses_nonsfi_mode, |
| 85 PP_NaClAppProcessType process_type); | 87 PP_NaClAppProcessType process_type); |
| 86 | 88 |
| 87 // Load support. | 89 // Load support. |
| 88 // A helper SRPC NaCl module can be loaded given a PP_NaClFileInfo. | 90 // A helper SRPC NaCl module can be loaded given a PP_NaClFileInfo. |
| 89 // Blocks until the helper module signals initialization is done. | 91 // Blocks until the helper module signals initialization is done. |
| 90 // Does not update nacl_module_origin(). | 92 // Does not update nacl_module_origin(). |
| 91 // Returns NULL or the NaClSubprocess of the new helper NaCl module. | 93 // Returns NULL or the NaClSubprocess of the new helper NaCl module. |
| 94 // Please note that a call to this function takes over ownership of the |
| 95 // file_info pointer. |
| 92 NaClSubprocess* LoadHelperNaClModule(const std::string& helper_url, | 96 NaClSubprocess* LoadHelperNaClModule(const std::string& helper_url, |
| 93 PP_NaClFileInfo file_info, | 97 PP_NaClFileInfo file_info, |
| 94 ErrorInfo* error_info); | 98 ErrorInfo* error_info); |
| 95 | 99 |
| 96 // Report an error that was encountered while loading a module. | 100 // Report an error that was encountered while loading a module. |
| 97 void ReportLoadError(const ErrorInfo& error_info); | 101 void ReportLoadError(const ErrorInfo& error_info); |
| 98 | 102 |
| 99 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } | 103 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } |
| 100 | 104 |
| 101 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } | 105 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 174 |
| 171 PP_NaClFileInfo nexe_file_info_; | 175 PP_NaClFileInfo nexe_file_info_; |
| 172 | 176 |
| 173 const PPB_NaCl_Private* nacl_interface_; | 177 const PPB_NaCl_Private* nacl_interface_; |
| 174 pp::UMAPrivate uma_interface_; | 178 pp::UMAPrivate uma_interface_; |
| 175 }; | 179 }; |
| 176 | 180 |
| 177 } // namespace plugin | 181 } // namespace plugin |
| 178 | 182 |
| 179 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ | 183 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_PLUGIN_H_ |
| OLD | NEW |