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

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: fix fd management, again 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ~Plugin(); 139 ~Plugin();
140 140
141 // Shuts down socket connection, service runtime, and receive thread, 141 // Shuts down socket connection, service runtime, and receive thread,
142 // in this order, for the main nacl subprocess. 142 // in this order, for the main nacl subprocess.
143 void ShutDownSubprocesses(); 143 void ShutDownSubprocesses();
144 144
145 // Histogram helper functions, internal to Plugin so they can use 145 // Histogram helper functions, internal to Plugin so they can use
146 // uma_interface_ normally. 146 // uma_interface_ normally.
147 void HistogramTimeSmall(const std::string& name, int64_t ms); 147 void HistogramTimeSmall(const std::string& name, int64_t ms);
148 148
149 // Load a nacl module from the file specified in file_info. 149 // Loads and starts a helper (e.g. llc, ld) NaCl module.
150 // Only to be used from a background (non-main) thread for the PNaCl 150 // Only to be used from a background (non-main) thread for the PNaCl
151 // translator. This will fully initialize the |subprocess| if the load was 151 // translator. This will fully initialize the |subprocess| if the load was
152 // successful. 152 // successful.
153 bool LoadHelperNaClModule(PP_NaClFileInfo file_info, 153 bool LoadHelperNaClModuleInternal(NaClSubprocess* subprocess,
154 NaClSubprocess* subprocess, 154 const SelLdrStartParams& params);
155 const SelLdrStartParams& params);
156 155
157 // Start sel_ldr from the main thread, given the start params. 156 // Start sel_ldr from the main thread, given the start params.
158 // |pp_error| is set by CallOnMainThread (should be PP_OK). 157 // |pp_error| is set by CallOnMainThread (should be PP_OK).
159 void StartSelLdrOnMainThread(int32_t pp_error, 158 void StartSelLdrOnMainThread(int32_t pp_error,
160 ServiceRuntime* service_runtime, 159 ServiceRuntime* service_runtime,
161 const SelLdrStartParams& params, 160 const SelLdrStartParams& params,
162 pp::CompletionCallback callback); 161 pp::CompletionCallback callback);
163 162
164 // Signals that StartSelLdr has finished. 163 // Signals that StartSelLdr has finished.
165 // This is invoked on the main thread. 164 // This is invoked on the main thread.
166 void SignalStartSelLdrDone(int32_t pp_error, 165 void SignalStartSelLdrDone(int32_t pp_error,
167 bool* started, 166 bool* started,
168 ServiceRuntime* service_runtime); 167 ServiceRuntime* service_runtime);
169 168
170 // This is invoked on the main thread. 169 // This is invoked on the main thread.
171 void LoadNexeAndStart(int32_t pp_error, 170 void StartNexe(int32_t pp_error, ServiceRuntime* service_runtime);
172 ServiceRuntime* service_runtime,
173 PP_NaClFileInfo file_info);
174 171
175 // Callback used when getting the URL for the .nexe file. If the URL loading 172 // Callback used when getting the URL for the .nexe file. If the URL loading
176 // is successful, the file descriptor is opened and can be passed to sel_ldr 173 // is successful, the file descriptor is opened and can be passed to sel_ldr
177 // with the sandbox on. 174 // with the sandbox on.
178 void NexeFileDidOpen(int32_t pp_error); 175 void NexeFileDidOpen(int32_t pp_error);
179 void NexeFileDidOpenContinuation(int32_t pp_error); 176 void NexeFileDidOpenContinuation(int32_t pp_error);
180 177
181 // Callback used when the reverse channel closes. This is an 178 // Callback used when the reverse channel closes. This is an
182 // asynchronous event that might turn into a JavaScript error or 179 // asynchronous event that might turn into a JavaScript error or
183 // crash event -- this is controlled by the two state variables 180 // crash event -- this is controlled by the two state variables
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 222
226 PP_NaClFileInfo nexe_file_info_; 223 PP_NaClFileInfo nexe_file_info_;
227 224
228 const PPB_NaCl_Private* nacl_interface_; 225 const PPB_NaCl_Private* nacl_interface_;
229 pp::UMAPrivate uma_interface_; 226 pp::UMAPrivate uma_interface_;
230 }; 227 };
231 228
232 } // namespace plugin 229 } // namespace plugin
233 230
234 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 231 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698