OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // A representation of an SRPC connection. These can be either to the | 7 // A representation of an SRPC connection. These can be either to the |
8 // service runtime or to untrusted NaCl threads. | 8 // service runtime or to untrusted NaCl threads. |
9 | 9 |
10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLIENT_H_ | 10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLIENT_H_ |
(...skipping 30 matching lines...) Expand all Loading... |
41 // The destructor closes the connection to sel_ldr. | 41 // The destructor closes the connection to sel_ldr. |
42 ~SrpcClient(); | 42 ~SrpcClient(); |
43 | 43 |
44 bool StartJSObjectProxy(Plugin* plugin, ErrorInfo* error_info); | 44 bool StartJSObjectProxy(Plugin* plugin, ErrorInfo* error_info); |
45 // Test whether the SRPC service has a given method. | 45 // Test whether the SRPC service has a given method. |
46 bool HasMethod(uintptr_t method_id); | 46 bool HasMethod(uintptr_t method_id); |
47 // Invoke an SRPC method. | 47 // Invoke an SRPC method. |
48 bool Invoke(uintptr_t method_id, SrpcParams* params); | 48 bool Invoke(uintptr_t method_id, SrpcParams* params); |
49 bool InitParams(uintptr_t method_id, SrpcParams* params); | 49 bool InitParams(uintptr_t method_id, SrpcParams* params); |
50 | 50 |
| 51 // Attach a service for reverse-direction (from .nexe) RPCs. |
| 52 void AttachService(NaClSrpcService* service, void* instance_data); |
| 53 |
51 private: | 54 private: |
52 NACL_DISALLOW_COPY_AND_ASSIGN(SrpcClient); | 55 NACL_DISALLOW_COPY_AND_ASSIGN(SrpcClient); |
53 SrpcClient(); | 56 SrpcClient(); |
54 void GetMethods(); | 57 void GetMethods(); |
55 typedef std::map<uintptr_t, MethodInfo*> Methods; | 58 typedef std::map<uintptr_t, MethodInfo*> Methods; |
56 Methods methods_; | 59 Methods methods_; |
57 NaClSrpcChannel srpc_channel_; | 60 NaClSrpcChannel srpc_channel_; |
58 bool srpc_channel_initialised_; | 61 bool srpc_channel_initialised_; |
59 BrowserInterface* browser_interface_; | 62 BrowserInterface* browser_interface_; |
60 }; | 63 }; |
61 | 64 |
62 } // namespace plugin | 65 } // namespace plugin |
63 | 66 |
64 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLIENT_H_ | 67 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLIENT_H_ |
OLD | NEW |