OLD | NEW |
1 // Copyright (c) 2010 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2010 The Native Client 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 <stdarg.h> | 5 #include <stdarg.h> |
6 | 6 |
7 #include "native_client/src/include/portability.h" | 7 #include "native_client/src/include/portability.h" |
8 #include "native_client/src/include/portability_process.h" | 8 #include "native_client/src/include/portability_process.h" |
9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" | 9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |
10 #include "native_client/src/shared/ppapi_proxy/utility.h" | 10 #include "native_client/src/shared/ppapi_proxy/utility.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } // namespace | 73 } // namespace |
74 | 74 |
75 // | 75 // |
76 // The following methods are the SRPC dispatchers for ppapi/c/ppp.h. | 76 // The following methods are the SRPC dispatchers for ppapi/c/ppp.h. |
77 // | 77 // |
78 | 78 |
79 void PppRpcServer::PPP_InitializeModule( | 79 void PppRpcServer::PPP_InitializeModule( |
80 NaClSrpcRpc* rpc, | 80 NaClSrpcRpc* rpc, |
81 NaClSrpcClosure* done, | 81 NaClSrpcClosure* done, |
82 int32_t pid, | 82 int32_t pid, |
83 int64_t module, | 83 PP_Module module, |
84 NaClSrpcImcDescType upcall_channel_desc, | 84 NaClSrpcImcDescType upcall_channel_desc, |
85 char* service_description, | 85 char* service_description, |
86 int32_t* nacl_pid, | 86 int32_t* nacl_pid, |
87 int32_t* success) { | 87 int32_t* success) { |
88 NaClSrpcClosureRunner runner(done); | 88 NaClSrpcClosureRunner runner(done); |
89 rpc->result = NACL_SRPC_RESULT_APP_ERROR; | 89 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
90 DebugPrintf("Plugin::PPP_InitializeModule: %s\n", service_description); | 90 DebugPrintf("Plugin::PPP_InitializeModule: %s\n", service_description); |
91 // Set up the service for calling back into the browser. | 91 // Set up the service for calling back into the browser. |
92 if (!StartMainSrpcChannel(const_cast<const char*>(service_description), | 92 if (!StartMainSrpcChannel(const_cast<const char*>(service_description), |
93 rpc->channel)) { | 93 rpc->channel)) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int32_t* exports_interface_name) { | 126 int32_t* exports_interface_name) { |
127 NaClSrpcClosureRunner runner(done); | 127 NaClSrpcClosureRunner runner(done); |
128 rpc->result = NACL_SRPC_RESULT_APP_ERROR; | 128 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
129 DebugPrintf("Plugin::PPP_GetInterface(%s)\n", interface_name); | 129 DebugPrintf("Plugin::PPP_GetInterface(%s)\n", interface_name); |
130 // Since the proxy will make calls to proxied interfaces, we need simply | 130 // Since the proxy will make calls to proxied interfaces, we need simply |
131 // to know whether the plugin exports a given interface. | 131 // to know whether the plugin exports a given interface. |
132 const void* plugin_interface = ::PPP_GetInterface(interface_name); | 132 const void* plugin_interface = ::PPP_GetInterface(interface_name); |
133 *exports_interface_name = (plugin_interface != NULL); | 133 *exports_interface_name = (plugin_interface != NULL); |
134 rpc->result = NACL_SRPC_RESULT_OK; | 134 rpc->result = NACL_SRPC_RESULT_OK; |
135 } | 135 } |
OLD | NEW |