OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // To establish quota callbacks the pnacl coordinator needs to communicate | 261 // To establish quota callbacks the pnacl coordinator needs to communicate |
262 // with the reverse interface. | 262 // with the reverse interface. |
263 PluginReverseInterface* rev_interface() const { return rev_interface_; } | 263 PluginReverseInterface* rev_interface() const { return rev_interface_; } |
264 | 264 |
265 private: | 265 private: |
266 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); | 266 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); |
267 bool SetupCommandChannel(ErrorInfo* error_info); | 267 bool SetupCommandChannel(ErrorInfo* error_info); |
268 bool LoadModule(nacl::DescWrapper* shm, ErrorInfo* error_info); | 268 bool LoadModule(nacl::DescWrapper* shm, ErrorInfo* error_info); |
269 bool InitReverseService(ErrorInfo* error_info); | 269 bool InitReverseService(ErrorInfo* error_info); |
270 bool StartModule(ErrorInfo* error_info); | 270 bool StartModule(ErrorInfo* error_info); |
271 void StartSelLdrContinuation(int32_t pp_error, | |
272 pp::CompletionCallback callback); | |
273 | 271 |
274 NaClSrpcChannel command_channel_; | 272 NaClSrpcChannel command_channel_; |
275 Plugin* plugin_; | 273 Plugin* plugin_; |
276 bool main_service_runtime_; | 274 bool main_service_runtime_; |
277 bool uses_nonsfi_mode_; | 275 bool uses_nonsfi_mode_; |
278 nacl::ReverseService* reverse_service_; | 276 nacl::ReverseService* reverse_service_; |
279 nacl::scoped_ptr<nacl::SelLdrLauncherBase> subprocess_; | 277 nacl::scoped_ptr<nacl::SelLdrLauncherBase> subprocess_; |
280 | 278 |
281 nacl::WeakRefAnchor* anchor_; | 279 nacl::WeakRefAnchor* anchor_; |
282 | 280 |
283 PluginReverseInterface* rev_interface_; | 281 PluginReverseInterface* rev_interface_; |
284 | 282 |
285 // Mutex to protect exit_status_. | 283 // Mutex to protect exit_status_. |
286 // Also, in conjunction with cond_ it is used to signal when | 284 // Also, in conjunction with cond_ it is used to signal when |
287 // StartSelLdr is complete with either success or error. | 285 // StartSelLdr is complete with either success or error. |
288 NaClMutex mu_; | 286 NaClMutex mu_; |
289 NaClCondVar cond_; | 287 NaClCondVar cond_; |
290 int exit_status_; | 288 int exit_status_; |
291 bool start_sel_ldr_done_; | 289 bool start_sel_ldr_done_; |
292 | 290 |
293 PP_Var start_sel_ldr_error_message_; | |
294 pp::CompletionCallbackFactory<ServiceRuntime> callback_factory_; | 291 pp::CompletionCallbackFactory<ServiceRuntime> callback_factory_; |
295 }; | 292 }; |
296 | 293 |
297 } // namespace plugin | 294 } // namespace plugin |
298 | 295 |
299 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 296 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
OLD | NEW |