Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.h

Issue 332463003: Pepper: Remove LOAD_MODULE SRPC call in SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment to forward declaration Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ~Plugin(); 140 ~Plugin();
141 141
142 // Shuts down socket connection, service runtime, and receive thread, 142 // Shuts down socket connection, service runtime, and receive thread,
143 // in this order, for the main nacl subprocess. 143 // in this order, for the main nacl subprocess.
144 void ShutDownSubprocesses(); 144 void ShutDownSubprocesses();
145 145
146 // Histogram helper functions, internal to Plugin so they can use 146 // Histogram helper functions, internal to Plugin so they can use
147 // uma_interface_ normally. 147 // uma_interface_ normally.
148 void HistogramTimeSmall(const std::string& name, int64_t ms); 148 void HistogramTimeSmall(const std::string& name, int64_t ms);
149 149
150 // Load a nacl module from the file specified in file_info. 150 // Loads and starts a helper (e.g. llc, ld) NaCl module.
151 // Only to be used from a background (non-main) thread for the PNaCl 151 // Only to be used from a background (non-main) thread for the PNaCl
152 // translator. This will fully initialize the |subprocess| if the load was 152 // translator. This will fully initialize the |subprocess| if the load was
153 // successful. 153 // successful.
154 bool LoadHelperNaClModule(PP_NaClFileInfo file_info, 154 bool LoadHelperNaClModuleInternal(NaClSubprocess* subprocess,
155 NaClSubprocess* subprocess, 155 const SelLdrStartParams& params);
156 const SelLdrStartParams& params);
157 156
158 // Start sel_ldr from the main thread, given the start params. 157 // Start sel_ldr from the main thread, given the start params.
159 // |pp_error| is set by CallOnMainThread (should be PP_OK). 158 // |pp_error| is set by CallOnMainThread (should be PP_OK).
160 void StartSelLdrOnMainThread(int32_t pp_error, 159 void StartSelLdrOnMainThread(int32_t pp_error,
161 ServiceRuntime* service_runtime, 160 ServiceRuntime* service_runtime,
162 const SelLdrStartParams& params, 161 const SelLdrStartParams& params,
163 pp::CompletionCallback callback); 162 pp::CompletionCallback callback);
164 163
165 // Signals that StartSelLdr has finished. 164 // Signals that StartSelLdr has finished.
166 // This is invoked on the main thread. 165 // This is invoked on the main thread.
167 void SignalStartSelLdrDone(int32_t pp_error, 166 void SignalStartSelLdrDone(int32_t pp_error,
168 bool* started, 167 bool* started,
169 ServiceRuntime* service_runtime); 168 ServiceRuntime* service_runtime);
170 169
171 // This is invoked on the main thread. 170 // This is invoked on the main thread.
172 void LoadNexeAndStart(int32_t pp_error, 171 void StartNexe(int32_t pp_error, ServiceRuntime* service_runtime);
173 ServiceRuntime* service_runtime,
174 PP_NaClFileInfo file_info);
175 172
176 // Callback used when getting the URL for the .nexe file. If the URL loading 173 // Callback used when getting the URL for the .nexe file. If the URL loading
177 // is successful, the file descriptor is opened and can be passed to sel_ldr 174 // is successful, the file descriptor is opened and can be passed to sel_ldr
178 // with the sandbox on. 175 // with the sandbox on.
179 void NexeFileDidOpen(int32_t pp_error); 176 void NexeFileDidOpen(int32_t pp_error);
180 void NexeFileDidOpenContinuation(int32_t pp_error); 177 void NexeFileDidOpenContinuation(int32_t pp_error);
181 178
182 // Callback used when the reverse channel closes. This is an 179 // Callback used when the reverse channel closes. This is an
183 // asynchronous event that might turn into a JavaScript error or 180 // asynchronous event that might turn into a JavaScript error or
184 // crash event -- this is controlled by the two state variables 181 // crash event -- this is controlled by the two state variables
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 223
227 PP_NaClFileInfo nexe_file_info_; 224 PP_NaClFileInfo nexe_file_info_;
228 225
229 const PPB_NaCl_Private* nacl_interface_; 226 const PPB_NaCl_Private* nacl_interface_;
230 pp::UMAPrivate uma_interface_; 227 pp::UMAPrivate uma_interface_;
231 }; 228 };
232 229
233 } // namespace plugin 230 } // namespace plugin
234 231
235 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 232 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698