OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
| 6 #include "native_client/src/shared/ppapi_proxy/utility.h" |
| 7 #include "srpcgen/ppb_rpc.h" |
| 8 |
| 9 using ppapi_proxy::DebugPrintf; |
| 10 using ppapi_proxy::GetBrowserInterface; |
| 11 |
| 12 void PpbRpcServer::PPB_GetInterface(NaClSrpcRpc* rpc, |
| 13 NaClSrpcClosure* done, |
| 14 char* interface_name, |
| 15 int32_t* exports_interface_name) { |
| 16 NaClSrpcClosureRunner runner(done); |
| 17 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| 18 // Since the proxy will make calls to proxied interfaces, we need simply |
| 19 // to know whether the plugin exports a given interface. |
| 20 const void* browser_interface = GetBrowserInterface(interface_name); |
| 21 DebugPrintf("PPB_GetInterface('%s'): %p\n", |
| 22 interface_name, browser_interface); |
| 23 *exports_interface_name = (browser_interface != NULL); |
| 24 rpc->result = NACL_SRPC_RESULT_OK; |
| 25 } |
OLD | NEW |