Chromium Code Reviews| 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; | 34 class BrowserInterface; |
|
jvoung - send to chromium...
2012/02/15 08:28:17
no need for this declaration of BrowserInterface a
sehr (please use chromium)
2012/02/15 17:58:10
Done.
| |
| 35 class ErrorInfo; | 35 class ErrorInfo; |
| 36 class Manifest; | 36 class Manifest; |
| 37 class Plugin; | 37 class Plugin; |
| 38 class SrpcClient; | 38 class SrpcClient; |
| 39 class ServiceRuntime; | 39 class ServiceRuntime; |
| 40 | 40 |
| 41 // Callback resources are essentially our continuation state. | 41 // Callback resources are essentially our continuation state. |
| 42 | 42 |
| 43 struct LogToJavaScriptConsoleResource { | 43 struct LogToJavaScriptConsoleResource { |
| 44 public: | 44 public: |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 Plugin* plugin() const { return plugin_; } | 182 Plugin* plugin() const { return plugin_; } |
| 183 void Shutdown(); | 183 void Shutdown(); |
| 184 | 184 |
| 185 // exit_status is -1 when invalid; when we set it, we will ensure | 185 // 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 | 186 // 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 | 187 // nexe that is transferred is the low 8 bits of the argument to the |
| 188 // exit syscall). | 188 // exit syscall). |
| 189 int exit_status(); // const, but grabs mutex etc. | 189 int exit_status(); // const, but grabs mutex etc. |
| 190 void set_exit_status(int exit_status); | 190 void set_exit_status(int exit_status); |
| 191 | 191 |
| 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: | 192 private: |
| 196 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); | 193 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); |
| 197 bool InitCommunication(nacl::DescWrapper* shm, ErrorInfo* error_info); | 194 bool InitCommunication(nacl::DescWrapper* shm, ErrorInfo* error_info); |
| 198 | 195 |
| 199 NaClSrpcChannel command_channel_; | 196 NaClSrpcChannel command_channel_; |
| 200 Plugin* plugin_; | 197 Plugin* plugin_; |
| 201 bool should_report_uma_; | 198 bool should_report_uma_; |
| 202 BrowserInterface* browser_interface_; | |
| 203 nacl::ReverseService* reverse_service_; | 199 nacl::ReverseService* reverse_service_; |
| 204 nacl::scoped_ptr<nacl::SelLdrLauncher> subprocess_; | 200 nacl::scoped_ptr<nacl::SelLdrLauncher> subprocess_; |
| 205 | 201 |
| 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_; | 202 nacl::WeakRefAnchor* anchor_; |
| 214 | 203 |
| 215 PluginReverseInterface* rev_interface_; | 204 PluginReverseInterface* rev_interface_; |
| 216 | 205 |
| 217 NaClMutex mu_; | 206 NaClMutex mu_; |
| 218 int exit_status_; | 207 int exit_status_; |
| 219 }; | 208 }; |
| 220 | 209 |
| 221 } // namespace plugin | 210 } // namespace plugin |
| 222 | 211 |
| 223 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 212 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |