| 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 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_module.h" |
| 8 #include "ppapi/c/ppb.h" | 9 #include "ppapi/c/ppb.h" |
| 9 #include "ppapi/c/ppb_core.h" | 10 #include "ppapi/c/ppb_core.h" |
| 10 #include "ppapi/c/ppb_var.h" | 11 #include "ppapi/c/ppb_var.h" |
| 11 | 12 |
| 12 struct NaClSrpcChannel; | 13 struct NaClSrpcChannel; |
| 13 | 14 |
| 14 namespace ppapi_proxy { | 15 namespace ppapi_proxy { |
| 15 | 16 |
| 16 // The main SRPC channel is that used to handle foreground (main thread) | 17 // The main SRPC channel is that used to handle foreground (main thread) |
| 17 // RPC traffic. | 18 // RPC traffic. |
| 18 NaClSrpcChannel* GetMainSrpcChannel(); | 19 NaClSrpcChannel* GetMainSrpcChannel(); |
| 19 void SetMainSrpcChannel(NaClSrpcChannel* channel); | 20 void SetMainSrpcChannel(NaClSrpcChannel* channel); |
| 20 | 21 |
| 21 // The upcall SRPC channel is that used to handle other threads' RPC traffic. | 22 // The upcall SRPC channel is that used to handle other threads' RPC traffic. |
| 22 NaClSrpcChannel* GetUpcallSrpcChannel(); | 23 NaClSrpcChannel* GetUpcallSrpcChannel(); |
| 23 void SetUpcallSrpcChannel(NaClSrpcChannel* channel); | 24 void SetUpcallSrpcChannel(NaClSrpcChannel* channel); |
| 24 | 25 |
| 26 // Save the plugin's module_id, which is used for storage allocation tracking. |
| 27 void SetModuleIdForSrpcChannel(NaClSrpcChannel* channel, PP_Module module_id); |
| 28 // Forget the plugin's module_id. |
| 29 void UnsetModuleIdForSrpcChannel(NaClSrpcChannel* channel); |
| 30 // Save the plugin's module_id. |
| 31 PP_Module LookupModuleIdForSrpcChannel(NaClSrpcChannel* channel); |
| 32 |
| 25 // Get the PPB_Core interface passed in from the browser. | 33 // Get the PPB_Core interface passed in from the browser. |
| 26 const PPB_Core* CoreInterface(); | 34 const PPB_Core* CoreInterface(); |
| 27 | 35 |
| 28 // Get the PPB_Var interface passed in from the browser. | 36 // Get the PPB_Var interface passed in from the browser. |
| 29 const PPB_Var* VarInterface(); | 37 const PPB_Var* VarInterface(); |
| 30 | 38 |
| 31 } // namespace ppapi_proxy | 39 } // namespace ppapi_proxy |
| 32 | 40 |
| 33 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 41 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| OLD | NEW |