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

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

Issue 8974020: Change pnacl to read all resources from the extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_ 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_ 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_
7 7
8 #include <set> 8 #include <set>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void ReportPpapiError(int32_t pp_error, const nacl::string& message); 190 void ReportPpapiError(int32_t pp_error, const nacl::string& message);
191 void ReportPpapiError(int32_t pp_error); 191 void ReportPpapiError(int32_t pp_error);
192 192
193 private: 193 private:
194 NACL_DISALLOW_COPY_AND_ASSIGN(PnaclCoordinator); 194 NACL_DISALLOW_COPY_AND_ASSIGN(PnaclCoordinator);
195 195
196 // BitcodeToNative is the factory method for PnaclCoordinators. 196 // BitcodeToNative is the factory method for PnaclCoordinators.
197 // Therefore the constructor is private. 197 // Therefore the constructor is private.
198 PnaclCoordinator(Plugin* plugin, 198 PnaclCoordinator(Plugin* plugin,
199 const nacl::string& pexe_url, 199 const nacl::string& pexe_url,
200 const pp::CompletionCallback& translate_notify_callback, 200 const pp::CompletionCallback& translate_notify_callback);
201 const nacl::string& resource_base_url);
202 201
203 // Callback for when llc and ld have been downloaded. 202 // Callback for when llc and ld have been downloaded.
204 // This is the first callback invoked in response to BitcodeToNative. 203 // This is the first callback invoked in response to BitcodeToNative.
205 void ResourcesDidLoad(int32_t pp_error); 204 void ResourcesDidLoad(int32_t pp_error);
206 205
207 // Callbacks for temporary file related stages. 206 // Callbacks for temporary file related stages.
208 // They are invoked from ResourcesDidLoad and proceed in declaration order. 207 // They are invoked from ResourcesDidLoad and proceed in declaration order.
209 // Invoked when the temporary file system is successfully opened in PPAPI. 208 // Invoked when the temporary file system is successfully opened in PPAPI.
210 void FileSystemDidOpen(int32_t pp_error); 209 void FileSystemDidOpen(int32_t pp_error);
211 // Invoked when the obj_file_ temporary file I/O pair is created. 210 // Invoked when the obj_file_ temporary file I/O pair is created.
(...skipping 22 matching lines...) Expand all
234 233
235 // The plugin owning the nexe for which we are doing translation. 234 // The plugin owning the nexe for which we are doing translation.
236 Plugin* plugin_; 235 Plugin* plugin_;
237 236
238 pp::CompletionCallback translate_notify_callback_; 237 pp::CompletionCallback translate_notify_callback_;
239 // PnaclRefCount is only needed to support file lookups. 238 // PnaclRefCount is only needed to support file lookups.
240 // TODO(sehr): remove this when file lookup is through ReverseService. 239 // TODO(sehr): remove this when file lookup is through ReverseService.
241 pp::CompletionCallbackFactory<PnaclCoordinator, 240 pp::CompletionCallbackFactory<PnaclCoordinator,
242 PnaclRefCount> callback_factory_; 241 PnaclRefCount> callback_factory_;
243 242
244 // URLs used to lookup downloaded resources.
245 nacl::string resource_base_url_;
246
247 // Helper subprocesses loaded by the plugin (deleted by the plugin). 243 // Helper subprocesses loaded by the plugin (deleted by the plugin).
248 // A nacl sandbox running the llc nexe. 244 // A nacl sandbox running the llc nexe.
249 NaClSubprocess* llc_subprocess_; 245 NaClSubprocess* llc_subprocess_;
250 // A nacl sandbox running the ld nexe. 246 // A nacl sandbox running the ld nexe.
251 NaClSubprocess* ld_subprocess_; 247 NaClSubprocess* ld_subprocess_;
252 // True if the translation thread and subprocesses should exit. 248 // True if the translation thread and subprocesses should exit.
253 bool subprocesses_should_die_; 249 bool subprocesses_should_die_;
254 // Used to guard and publish subprocesses_should_die_. 250 // Used to guard and publish subprocesses_should_die_.
255 struct NaClMutex subprocess_mu_; 251 struct NaClMutex subprocess_mu_;
256 252
(...skipping 21 matching lines...) Expand all
278 pp::CompletionCallback translate_done_cb_; 274 pp::CompletionCallback translate_done_cb_;
279 275
280 // Used to report information when errors (PPAPI or otherwise) are reported. 276 // Used to report information when errors (PPAPI or otherwise) are reported.
281 ErrorInfo error_info_; 277 ErrorInfo error_info_;
282 }; 278 };
283 279
284 //---------------------------------------------------------------------- 280 //----------------------------------------------------------------------
285 281
286 } // namespace plugin; 282 } // namespace plugin;
287 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_ 283 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_COORDINATOR_H_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.cc ('k') | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698