OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Instances of NaCl modules spun up within the plugin as a subprocess. | 5 // Instances of NaCl modules spun up within the plugin as a subprocess. |
6 // This may represent the "main" nacl module, or it may represent helpers | 6 // This may represent the "main" nacl module, or it may represent helpers |
7 // that perform various tasks within the plugin, for example, | 7 // that perform various tasks within the plugin, for example, |
8 // a NaCl module for a compiler could be loaded to translate LLVM bitcode | 8 // a NaCl module for a compiler could be loaded to translate LLVM bitcode |
9 // into native code. | 9 // into native code. |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // A basic description of the subprocess. | 50 // A basic description of the subprocess. |
51 nacl::string description() const { return description_; } | 51 nacl::string description() const { return description_; } |
52 | 52 |
53 // A detailed description of the subprocess that may contain addresses. | 53 // A detailed description of the subprocess that may contain addresses. |
54 // Only use for debugging, but do not expose this to untrusted webapps. | 54 // Only use for debugging, but do not expose this to untrusted webapps. |
55 nacl::string detailed_description() const; | 55 nacl::string detailed_description() const; |
56 | 56 |
57 // Start up interfaces. | 57 // Start up interfaces. |
58 bool StartSrpcServices(); | 58 bool StartSrpcServices(); |
59 bool StartJSObjectProxy(Plugin* plugin, ErrorInfo* error_info); | |
60 | 59 |
61 // Invoke an Srpc Method. |out_params| must be allocated and cleaned up | 60 // Invoke an Srpc Method. |out_params| must be allocated and cleaned up |
62 // outside of this function, but it will be initialized by this function, and | 61 // outside of this function, but it will be initialized by this function, and |
63 // on success any out-params (if any) will be placed in |out_params|. | 62 // on success any out-params (if any) will be placed in |out_params|. |
64 // Input types must be listed in |input_signature|, with the actual | 63 // Input types must be listed in |input_signature|, with the actual |
65 // arguments passed in as var-args. Returns |true| on success. | 64 // arguments passed in as var-args. Returns |true| on success. |
66 bool InvokeSrpcMethod(const nacl::string& method_name, | 65 bool InvokeSrpcMethod(const nacl::string& method_name, |
67 const nacl::string& input_signature, | 66 const nacl::string& input_signature, |
68 SrpcParams* out_params, | 67 SrpcParams* out_params, |
69 ...); | 68 ...); |
(...skipping 13 matching lines...) Expand all Loading... |
83 | 82 |
84 // The service runtime representing the NaCl module instance. | 83 // The service runtime representing the NaCl module instance. |
85 nacl::scoped_ptr<ServiceRuntime> service_runtime_; | 84 nacl::scoped_ptr<ServiceRuntime> service_runtime_; |
86 // Ownership of srpc_client taken from the service runtime. | 85 // Ownership of srpc_client taken from the service runtime. |
87 nacl::scoped_ptr<SrpcClient> srpc_client_; | 86 nacl::scoped_ptr<SrpcClient> srpc_client_; |
88 }; | 87 }; |
89 | 88 |
90 } // namespace plugin | 89 } // namespace plugin |
91 | 90 |
92 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_SUBPROCESS_H_ | 91 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_SUBPROCESS_H_ |
OLD | NEW |