7 #include "ppapi/c/private/ppb_instance_private.h"
8 #include "ppapi/c/private/ppp_instance_private.h"
16 template <>
const char* interface_name<PPB_Instance_Private>() {
17 return PPB_INSTANCE_PRIVATE_INTERFACE;
20 PP_Var GetInstanceObject(PP_Instance pp_instance) {
22 if (!module_singleton)
23 return Var().Detach();
24 InstancePrivate* instance_private =
static_cast<InstancePrivate*
>(
25 module_singleton->InstanceForPPInstance(pp_instance));
26 if (!instance_private)
27 return Var().Detach();
28 return instance_private->GetInstanceObject().Detach();
31 const PPP_Instance_Private ppp_instance_private = {
41 &ppp_instance_private);
51 if (!has_interface<PPB_Instance_Private>())
58 if (!has_interface<PPB_Instance_Private>())
66 if (!has_interface<PPB_Instance_Private>())
VarPrivate GetWindowObject()
See PPB_Instance_Private.GetWindowObject.
virtual Var GetInstanceObject()
See PPP_Instance_Private.GetInstanceObject.
void AddPluginInterface(const std::string &interface_name, const void *vtable)
const PP_Var & pp_var() const
PP_Instance pp_instance() const
VarPrivate ExecuteScript(const Var &script, Var *exception=NULL)
See PPB_Instance.ExecuteScript.
InstancePrivate(PP_Instance instance)
VarPrivate GetOwnerElementObject()
See PPB_Instance_Private.GetOwnerElementObject.
A generic type used for passing data types between the module and the page.
virtual ~InstancePrivate()