| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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/shared/platform/nacl_check.h" |    5 #include "native_client/src/shared/platform/nacl_check.h" | 
|    6 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |    6 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" | 
|    7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_core.h" |    7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_core.h" | 
|    8 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" |    8 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" | 
|    9 #include "native_client/src/shared/ppapi_proxy/ppruntime.h" |    9 #include "native_client/src/shared/ppapi_proxy/ppruntime.h" | 
|   10 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h" |   10 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h" | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   78 const PPB_Memory_Dev* PPBMemoryInterface() { |   78 const PPB_Memory_Dev* PPBMemoryInterface() { | 
|   79   return static_cast<const PPB_Memory_Dev*>( |   79   return static_cast<const PPB_Memory_Dev*>( | 
|   80       GetBrowserInterfaceSafe(PPB_MEMORY_DEV_INTERFACE)); |   80       GetBrowserInterfaceSafe(PPB_MEMORY_DEV_INTERFACE)); | 
|   81 } |   81 } | 
|   82  |   82  | 
|   83 const PPB_Var* PPBVarInterface() { |   83 const PPB_Var* PPBVarInterface() { | 
|   84   return static_cast<const PPB_Var*>( |   84   return static_cast<const PPB_Var*>( | 
|   85       GetBrowserInterfaceSafe(PPB_VAR_INTERFACE)); |   85       GetBrowserInterfaceSafe(PPB_VAR_INTERFACE)); | 
|   86 } |   86 } | 
|   87  |   87  | 
 |   88 const PPB_VarArrayBuffer_Dev* PPBVarArrayBufferInterface() { | 
 |   89   return static_cast<const PPB_VarArrayBuffer_Dev*>( | 
 |   90       GetBrowserInterfaceSafe(PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE)); | 
 |   91 } | 
 |   92  | 
|   88 // Plugin interface helpers |   93 // Plugin interface helpers | 
|   89  |   94  | 
|   90 const void* GetPluginInterface(const char* interface_name) { |   95 const void* GetPluginInterface(const char* interface_name) { | 
|   91   return ::PPP_GetInterface(interface_name); |   96   return ::PPP_GetInterface(interface_name); | 
|   92 } |   97 } | 
|   93  |   98  | 
|   94 const void* GetPluginInterfaceSafe(const char* interface_name) { |   99 const void* GetPluginInterfaceSafe(const char* interface_name) { | 
|   95   const void* ppp_interface = GetPluginInterface(interface_name); |  100   const void* ppp_interface = GetPluginInterface(interface_name); | 
|   96   if (ppp_interface == NULL) |  101   if (ppp_interface == NULL) | 
|   97     DebugPrintf("PPP_GetInterface: %s not found\n", interface_name); |  102     DebugPrintf("PPP_GetInterface: %s not found\n", interface_name); | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  189   PpapiPluginRegisterDefaultThreadCreator(); |  194   PpapiPluginRegisterDefaultThreadCreator(); | 
|  190   // Designate this as the main thread for PPB_Core::IsMainThread(). |  195   // Designate this as the main thread for PPB_Core::IsMainThread(). | 
|  191   ppapi_proxy::PluginCore::MarkMainThread(); |  196   ppapi_proxy::PluginCore::MarkMainThread(); | 
|  192   if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) { |  197   if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) { | 
|  193     return 1; |  198     return 1; | 
|  194   } |  199   } | 
|  195   NaClSrpcModuleFini(); |  200   NaClSrpcModuleFini(); | 
|  196  |  201  | 
|  197   return 0; |  202   return 0; | 
|  198 } |  203 } | 
| OLD | NEW |