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

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

Issue 321053004: Add limitation that LoadNexeAndStart must be called on the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 /* 2 /*
3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 // A class containing information regarding a socket connection to a 8 // A class containing information regarding a socket connection to a
9 // service runtime instance. 9 // service runtime instance.
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // If starting the nexe from a background thread, wait for the nexe to 186 // If starting the nexe from a background thread, wait for the nexe to
187 // actually start. 187 // actually start.
188 void WaitForNexeStart(); 188 void WaitForNexeStart();
189 189
190 // Signal to waiting threads that LoadNexeAndStart is complete (either 190 // Signal to waiting threads that LoadNexeAndStart is complete (either
191 // successfully or unsuccessfully). 191 // successfully or unsuccessfully).
192 void SignalNexeStarted(); 192 void SignalNexeStarted();
193 193
194 // Establish an SrpcClient to the sel_ldr instance and load the nexe. 194 // Establish an SrpcClient to the sel_ldr instance and load the nexe.
195 // The nexe to be started is passed through |file_info|. 195 // The nexe to be started is passed through |file_info|.
196 // This function must be called on the main thread.
196 void LoadNexeAndStart(PP_NaClFileInfo file_info, 197 void LoadNexeAndStart(PP_NaClFileInfo file_info,
197 const pp::CompletionCallback& started_cb, 198 const pp::CompletionCallback& callback);
198 const pp::CompletionCallback& crash_cb);
199 199
200 // Starts the application channel to the nexe. 200 // Starts the application channel to the nexe.
201 SrpcClient* SetupAppChannel(); 201 SrpcClient* SetupAppChannel();
202 202
203 bool Log(int severity, const nacl::string& msg); 203 bool Log(int severity, const nacl::string& msg);
204 Plugin* plugin() const { return plugin_; } 204 Plugin* plugin() const { return plugin_; }
205 void Shutdown(); 205 void Shutdown();
206 206
207 // exit_status is -1 when invalid; when we set it, we will ensure 207 // exit_status is -1 when invalid; when we set it, we will ensure
208 // that it is non-negative (the portion of the exit status from the 208 // that it is non-negative (the portion of the exit status from the
(...skipping 27 matching lines...) Expand all
236 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_. 236 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_.
237 NaClMutex mu_; 237 NaClMutex mu_;
238 NaClCondVar cond_; 238 NaClCondVar cond_;
239 bool start_sel_ldr_done_; 239 bool start_sel_ldr_done_;
240 bool nexe_started_; 240 bool nexe_started_;
241 }; 241 };
242 242
243 } // namespace plugin 243 } // namespace plugin
244 244
245 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ 245 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698