| 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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Shuts down socket connection, service runtime, and receive thread, | 135 // Shuts down socket connection, service runtime, and receive thread, |
| 136 // in this order, for the main nacl subprocess. | 136 // in this order, for the main nacl subprocess. |
| 137 void ShutDownSubprocesses(); | 137 void ShutDownSubprocesses(); |
| 138 | 138 |
| 139 // Histogram helper functions, internal to Plugin so they can use | 139 // Histogram helper functions, internal to Plugin so they can use |
| 140 // uma_interface_ normally. | 140 // uma_interface_ normally. |
| 141 void HistogramTimeSmall(const std::string& name, int64_t ms); | 141 void HistogramTimeSmall(const std::string& name, int64_t ms); |
| 142 | 142 |
| 143 // Load a nacl module from the file specified in file_handle. | 143 // Load a nacl module from the file specified in file_handle. |
| 144 // Only to be used from a background (non-main) thread. | 144 // Only to be used from a background (non-main) thread for the PNaCl |
| 145 // This will fully initialize the |subprocess| if the load was successful. | 145 // translator. This will fully initialize the |subprocess| if the load was |
| 146 bool LoadNaClModuleFromBackgroundThread(PP_FileHandle file_handle, | 146 // successful. |
| 147 NaClSubprocess* subprocess, | 147 bool LoadHelperNaClModule(PP_FileHandle file_handle, |
| 148 const SelLdrStartParams& params); | 148 NaClSubprocess* subprocess, |
| 149 const SelLdrStartParams& params); |
| 149 | 150 |
| 150 // Start sel_ldr from the main thread, given the start params. | 151 // Start sel_ldr from the main thread, given the start params. |
| 151 // |pp_error| is set by CallOnMainThread (should be PP_OK). | 152 // |pp_error| is set by CallOnMainThread (should be PP_OK). |
| 152 void StartSelLdrOnMainThread(int32_t pp_error, | 153 void StartSelLdrOnMainThread(int32_t pp_error, |
| 153 ServiceRuntime* service_runtime, | 154 ServiceRuntime* service_runtime, |
| 154 const SelLdrStartParams& params, | 155 const SelLdrStartParams& params, |
| 155 pp::CompletionCallback callback); | 156 pp::CompletionCallback callback); |
| 156 | 157 |
| 157 // Signals that StartSelLdr has finished. | 158 // Signals that StartSelLdr has finished. |
| 158 // This is invoked on the main thread. | 159 // This is invoked on the main thread. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 229 |
| 229 PP_NaClFileInfo nexe_file_info_; | 230 PP_NaClFileInfo nexe_file_info_; |
| 230 | 231 |
| 231 const PPB_NaCl_Private* nacl_interface_; | 232 const PPB_NaCl_Private* nacl_interface_; |
| 232 pp::UMAPrivate uma_interface_; | 233 pp::UMAPrivate uma_interface_; |
| 233 }; | 234 }; |
| 234 | 235 |
| 235 } // namespace plugin | 236 } // namespace plugin |
| 236 | 237 |
| 237 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 238 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| OLD | NEW |