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/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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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* PPBVarArrayBufferInterface() { | 88 const PPB_VarArrayBuffer* PPBVarArrayBufferInterface() { |
89 return static_cast<const PPB_VarArrayBuffer*>( | 89 return static_cast<const PPB_VarArrayBuffer*>( |
90 GetBrowserInterfaceSafe(PPB_VAR_ARRAY_BUFFER_INTERFACE)); | 90 GetBrowserInterfaceSafe(PPB_VAR_ARRAY_BUFFER_INTERFACE)); |
91 } | 91 } |
92 | 92 |
93 const PPB_WebSocket_Dev* PPBWebSocketInterface() { | 93 const PPB_WebSocket* PPBWebSocketInterface() { |
94 return static_cast<const PPB_WebSocket_Dev*>( | 94 return static_cast<const PPB_WebSocket*>( |
95 GetBrowserInterfaceSafe(PPB_WEBSOCKET_DEV_INTERFACE)); | 95 GetBrowserInterfaceSafe(PPB_WEBSOCKET_INTERFACE)); |
96 } | 96 } |
97 | 97 |
98 // Plugin interface helpers | 98 // Plugin interface helpers |
99 | 99 |
100 const void* GetPluginInterface(const char* interface_name) { | 100 const void* GetPluginInterface(const char* interface_name) { |
101 return ::PPP_GetInterface(interface_name); | 101 return ::PPP_GetInterface(interface_name); |
102 } | 102 } |
103 | 103 |
104 const void* GetPluginInterfaceSafe(const char* interface_name) { | 104 const void* GetPluginInterfaceSafe(const char* interface_name) { |
105 const void* ppp_interface = GetPluginInterface(interface_name); | 105 const void* ppp_interface = GetPluginInterface(interface_name); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 PpapiPluginRegisterDefaultThreadCreator(); | 199 PpapiPluginRegisterDefaultThreadCreator(); |
200 // Designate this as the main thread for PPB_Core::IsMainThread(). | 200 // Designate this as the main thread for PPB_Core::IsMainThread(). |
201 ppapi_proxy::PluginCore::MarkMainThread(); | 201 ppapi_proxy::PluginCore::MarkMainThread(); |
202 if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) { | 202 if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) { |
203 return 1; | 203 return 1; |
204 } | 204 } |
205 NaClSrpcModuleFini(); | 205 NaClSrpcModuleFini(); |
206 | 206 |
207 return 0; | 207 return 0; |
208 } | 208 } |
OLD | NEW |