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

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

Issue 177113009: Support non-SFI mode in NaCl manifest file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // 82 //
83 // NB: currently we do not time out, so if the untrusted code 83 // NB: currently we do not time out, so if the untrusted code
84 // does not signal that it is ready, then we will deadlock the main 84 // does not signal that it is ready, then we will deadlock the main
85 // thread of the renderer on this subsequent event delivery. We 85 // thread of the renderer on this subsequent event delivery. We
86 // should include a time-out at which point we declare the 86 // should include a time-out at which point we declare the
87 // nacl_ready_state to be done, and let the normal crash detection 87 // nacl_ready_state to be done, and let the normal crash detection
88 // mechanism(s) take over. 88 // mechanism(s) take over.
89 // 89 //
90 // Updates nacl_module_origin() and nacl_module_url(). 90 // Updates nacl_module_origin() and nacl_module_url().
91 void LoadNaClModule(nacl::DescWrapper* wrapper, 91 void LoadNaClModule(nacl::DescWrapper* wrapper,
92 bool uses_nonsfi_mode,
92 bool enable_dyncode_syscalls, 93 bool enable_dyncode_syscalls,
93 bool enable_exception_handling, 94 bool enable_exception_handling,
94 bool enable_crash_throttling, 95 bool enable_crash_throttling,
95 const pp::CompletionCallback& init_done_cb, 96 const pp::CompletionCallback& init_done_cb,
96 const pp::CompletionCallback& crash_cb); 97 const pp::CompletionCallback& crash_cb);
97 98
98 // Finish hooking interfaces up, after low-level initialization is 99 // Finish hooking interfaces up, after low-level initialization is
99 // complete. 100 // complete.
100 bool LoadNaClModuleContinuationIntern(ErrorInfo* error_info); 101 bool LoadNaClModuleContinuationIntern(ErrorInfo* error_info);
101 102
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // The manifest file has been requested, but not yet received. 173 // The manifest file has been requested, but not yet received.
173 OPENED = 1, 174 OPENED = 1,
174 // This state is unused. 175 // This state is unused.
175 HEADERS_RECEIVED = 2, 176 HEADERS_RECEIVED = 2,
176 // The manifest file has been received and the nexe successfully requested. 177 // The manifest file has been received and the nexe successfully requested.
177 LOADING = 3, 178 LOADING = 3,
178 // The nexe has been loaded and the proxy started, so it is ready for 179 // The nexe has been loaded and the proxy started, so it is ready for
179 // interaction with the page. 180 // interaction with the page.
180 DONE = 4 181 DONE = 4
181 }; 182 };
183
182 bool nexe_error_reported() const { return nexe_error_reported_; } 184 bool nexe_error_reported() const { return nexe_error_reported_; }
183 void set_nexe_error_reported(bool val) { 185 void set_nexe_error_reported(bool val) {
184 nexe_error_reported_ = val; 186 nexe_error_reported_ = val;
185 } 187 }
186 188
187 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } 189 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; }
188 190
189 // Requests a NaCl manifest download from a |url| relative to the page origin. 191 // Requests a NaCl manifest download from a |url| relative to the page origin.
190 void RequestNaClManifest(const nacl::string& url); 192 void RequestNaClManifest(const nacl::string& url);
191 193
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status); 383 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status);
382 384
383 std::map<std::string, std::string> args_; 385 std::map<std::string, std::string> args_;
384 386
385 // Keep track of the NaCl module subprocess that was spun up in the plugin. 387 // Keep track of the NaCl module subprocess that was spun up in the plugin.
386 NaClSubprocess main_subprocess_; 388 NaClSubprocess main_subprocess_;
387 389
388 nacl::string plugin_base_url_; 390 nacl::string plugin_base_url_;
389 nacl::string manifest_base_url_; 391 nacl::string manifest_base_url_;
390 nacl::string manifest_url_; 392 nacl::string manifest_url_;
393 bool uses_nonsfi_mode_;
391 ReadyState nacl_ready_state_; 394 ReadyState nacl_ready_state_;
392 bool nexe_error_reported_; // error or crash reported 395 bool nexe_error_reported_; // error or crash reported
393 396
394 nacl::DescWrapperFactory* wrapper_factory_; 397 nacl::DescWrapperFactory* wrapper_factory_;
395 398
396 // File download support. |nexe_downloader_| can be opened with a specific 399 // File download support. |nexe_downloader_| can be opened with a specific
397 // callback to run when the file has been downloaded and is opened for 400 // callback to run when the file has been downloaded and is opened for
398 // reading. We use one downloader for all URL downloads to prevent issuing 401 // reading. We use one downloader for all URL downloads to prevent issuing
399 // multiple GETs that might arrive out of order. For example, this will 402 // multiple GETs that might arrive out of order. For example, this will
400 // prevent a GET of a NaCl manifest while a .nexe GET is pending. Note that 403 // prevent a GET of a NaCl manifest while a .nexe GET is pending. Note that
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 int64_t time_of_last_progress_event_; 468 int64_t time_of_last_progress_event_;
466 int exit_status_; 469 int exit_status_;
467 470
468 const PPB_NaCl_Private* nacl_interface_; 471 const PPB_NaCl_Private* nacl_interface_;
469 pp::UMAPrivate uma_interface_; 472 pp::UMAPrivate uma_interface_;
470 }; 473 };
471 474
472 } // namespace plugin 475 } // namespace plugin
473 476
474 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 477 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/nacl_entry_points.h ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698