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 #include "native_client/src/trusted/plugin/nacl_subprocess.h" | 5 #include "native_client/src/trusted/plugin/nacl_subprocess.h" |
6 | 6 |
7 #include <stdarg.h> | 7 #include <stdarg.h> |
8 | 8 |
9 #include "native_client/src/shared/srpc/nacl_srpc.h" | 9 #include "native_client/src/shared/srpc/nacl_srpc.h" |
10 #include "native_client/src/trusted/plugin/plugin_error.h" | 10 #include "native_client/src/trusted/plugin/plugin_error.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 NaClSubprocess::~NaClSubprocess() { | 34 NaClSubprocess::~NaClSubprocess() { |
35 Shutdown(); | 35 Shutdown(); |
36 } | 36 } |
37 | 37 |
38 bool NaClSubprocess::StartSrpcServices() { | 38 bool NaClSubprocess::StartSrpcServices() { |
39 srpc_client_.reset(service_runtime_->SetupAppChannel()); | 39 srpc_client_.reset(service_runtime_->SetupAppChannel()); |
40 return NULL != srpc_client_.get(); | 40 return NULL != srpc_client_.get(); |
41 } | 41 } |
42 | 42 |
43 bool NaClSubprocess::StartJSObjectProxy(Plugin* plugin, ErrorInfo* error_info) { | |
44 return srpc_client_->StartJSObjectProxy(plugin, error_info); | |
45 } | |
46 | |
47 bool NaClSubprocess::InvokeSrpcMethod(const nacl::string& method_name, | 43 bool NaClSubprocess::InvokeSrpcMethod(const nacl::string& method_name, |
48 const nacl::string& input_signature, | 44 const nacl::string& input_signature, |
49 SrpcParams* params, | 45 SrpcParams* params, |
50 ...) { | 46 ...) { |
51 va_list vl; | 47 va_list vl; |
52 va_start(vl, params); | 48 va_start(vl, params); |
53 bool result = VInvokeSrpcMethod(method_name, input_signature, params, vl); | 49 bool result = VInvokeSrpcMethod(method_name, input_signature, params, vl); |
54 va_end(vl); | 50 va_end(vl); |
55 return result; | 51 return result; |
56 } | 52 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 127 } |
132 params->ins()[i]->arrays.str = input; | 128 params->ins()[i]->arrays.str = input; |
133 break; | 129 break; |
134 } | 130 } |
135 } | 131 } |
136 } | 132 } |
137 return srpc_client_->Invoke(method_name, params); | 133 return srpc_client_->Invoke(method_name, params); |
138 } | 134 } |
139 | 135 |
140 } // namespace plugin | 136 } // namespace plugin |
OLD | NEW |