Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/service_runtime.h |
| diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.h b/ppapi/native_client/src/trusted/plugin/service_runtime.h |
| index dbafee7aa3b34934548bae6f19fff74f11bf6ddb..21a4d8ef376cadc3264d253f960d8eca2d6752a7 100644 |
| --- a/ppapi/native_client/src/trusted/plugin/service_runtime.h |
| +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.h |
| @@ -181,24 +181,22 @@ class ServiceRuntime { |
| void SignalStartSelLdrDone(); |
| // If starting the nexe from a background thread, wait for the nexe to |
| - // actually start. |
| - void WaitForNexeStart(); |
| + // actually start. Returns |true| is the nexe started successfully. |
| + bool WaitForNexeStart(); |
| // Signal to waiting threads that LoadNexeAndStart is complete (either |
| // successfully or unsuccessfully). |
| - void SignalNexeStarted(); |
| + void SignalNexeStarted(bool ok); |
| // Establish an SrpcClient to the sel_ldr instance and load the nexe. |
| // The nexe to be started is passed through |file_info|. |
| - // Upon completion |callback| is invoked with status code. |
| // This function must be called on the main thread. |
| - void LoadNexeAndStart(PP_NaClFileInfo file_info, |
| - const pp::CompletionCallback& callback); |
| + void LoadNexeAndStart(PP_NaClFileInfo file_info); |
|
hidehiko
2014/06/20 04:21:38
nit: Could you also add short comment that this fu
Nick Bray (chromium)
2014/06/20 17:10:42
Done.
|
| // Starts the application channel to the nexe. |
| SrpcClient* SetupAppChannel(); |
| - bool Log(int severity, const nacl::string& msg); |
| + bool RemoteLog(int severity, const nacl::string& msg); |
| Plugin* plugin() const { return plugin_; } |
| void Shutdown(); |
| @@ -215,17 +213,13 @@ class ServiceRuntime { |
| private: |
| NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); |
| - struct LoadNexeAndStartData; |
| - void LoadNexeAndStartAfterLoadModule( |
| - LoadNexeAndStartData* data, int32_t pp_error); |
| - void DidLoadNexeAndStart(LoadNexeAndStartData* data, int32_t pp_error); |
| + bool LoadNexeAndStartInternal(PP_NaClFileInfo file_info); |
|
hidehiko
2014/06/20 04:21:38
nit: "const PP_NaClFileInfo&".
Nick Bray (chromium)
2014/06/20 17:10:42
Done.
|
| bool SetupCommandChannel(); |
| bool InitReverseService(); |
| - void LoadModule(PP_NaClFileInfo file_info, |
| - pp::CompletionCallback callback); |
| - void DidLoadModule(pp::CompletionCallback callback, int32_t pp_error); |
| + bool LoadModule(PP_NaClFileInfo file_info); |
|
hidehiko
2014/06/20 04:21:38
nit: "const PP_NaClFileInfo&".
Nick Bray (chromium)
2014/06/20 17:10:42
Done.
|
| bool StartModule(); |
| + void ReapLogs(); |
| NaClSrpcChannel command_channel_; |
| Plugin* plugin_; |
| @@ -242,7 +236,8 @@ class ServiceRuntime { |
| NaClMutex mu_; |
| NaClCondVar cond_; |
| bool start_sel_ldr_done_; |
| - bool nexe_started_; |
| + bool start_nexe_done_; |
| + bool nexe_started_ok_; |
| }; |
| } // namespace plugin |