| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "ppapi/cpp/completion_callback.h" | 25 #include "ppapi/cpp/completion_callback.h" |
| 26 | 26 |
| 27 namespace nacl { | 27 namespace nacl { |
| 28 class DescWrapper; | 28 class DescWrapper; |
| 29 struct SelLdrLauncher; | 29 struct SelLdrLauncher; |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 namespace plugin { | 32 namespace plugin { |
| 33 | 33 |
| 34 class BrowserInterface; | |
| 35 class ErrorInfo; | 34 class ErrorInfo; |
| 36 class Manifest; | 35 class Manifest; |
| 37 class Plugin; | 36 class Plugin; |
| 38 class SrpcClient; | 37 class SrpcClient; |
| 39 class ServiceRuntime; | 38 class ServiceRuntime; |
| 40 | 39 |
| 41 // Callback resources are essentially our continuation state. | 40 // Callback resources are essentially our continuation state. |
| 42 | 41 |
| 43 struct LogToJavaScriptConsoleResource { | 42 struct LogToJavaScriptConsoleResource { |
| 44 public: | 43 public: |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 Plugin* plugin() const { return plugin_; } | 181 Plugin* plugin() const { return plugin_; } |
| 183 void Shutdown(); | 182 void Shutdown(); |
| 184 | 183 |
| 185 // exit_status is -1 when invalid; when we set it, we will ensure | 184 // exit_status is -1 when invalid; when we set it, we will ensure |
| 186 // that it is non-negative (the portion of the exit status from the | 185 // that it is non-negative (the portion of the exit status from the |
| 187 // nexe that is transferred is the low 8 bits of the argument to the | 186 // nexe that is transferred is the low 8 bits of the argument to the |
| 188 // exit syscall). | 187 // exit syscall). |
| 189 int exit_status(); // const, but grabs mutex etc. | 188 int exit_status(); // const, but grabs mutex etc. |
| 190 void set_exit_status(int exit_status); | 189 void set_exit_status(int exit_status); |
| 191 | 190 |
| 192 nacl::DescWrapper* async_receive_desc() { return async_receive_desc_.get(); } | |
| 193 nacl::DescWrapper* async_send_desc() { return async_send_desc_.get(); } | |
| 194 | |
| 195 private: | 191 private: |
| 196 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); | 192 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); |
| 197 bool InitCommunication(nacl::DescWrapper* shm, ErrorInfo* error_info); | 193 bool InitCommunication(nacl::DescWrapper* shm, ErrorInfo* error_info); |
| 198 | 194 |
| 199 NaClSrpcChannel command_channel_; | 195 NaClSrpcChannel command_channel_; |
| 200 Plugin* plugin_; | 196 Plugin* plugin_; |
| 201 bool should_report_uma_; | 197 bool should_report_uma_; |
| 202 BrowserInterface* browser_interface_; | |
| 203 nacl::ReverseService* reverse_service_; | 198 nacl::ReverseService* reverse_service_; |
| 204 nacl::scoped_ptr<nacl::SelLdrLauncher> subprocess_; | 199 nacl::scoped_ptr<nacl::SelLdrLauncher> subprocess_; |
| 205 | 200 |
| 206 // We need two IMC sockets rather than one because IMC sockets are | |
| 207 // not full-duplex on Windows. | |
| 208 // See http://code.google.com/p/nativeclient/issues/detail?id=690. | |
| 209 // TODO(mseaborn): We should not have to work around this. | |
| 210 nacl::scoped_ptr<nacl::DescWrapper> async_receive_desc_; | |
| 211 nacl::scoped_ptr<nacl::DescWrapper> async_send_desc_; | |
| 212 | |
| 213 nacl::WeakRefAnchor* anchor_; | 201 nacl::WeakRefAnchor* anchor_; |
| 214 | 202 |
| 215 PluginReverseInterface* rev_interface_; | 203 PluginReverseInterface* rev_interface_; |
| 216 | 204 |
| 217 NaClMutex mu_; | 205 NaClMutex mu_; |
| 218 int exit_status_; | 206 int exit_status_; |
| 219 }; | 207 }; |
| 220 | 208 |
| 221 } // namespace plugin | 209 } // namespace plugin |
| 222 | 210 |
| 223 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 211 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |