diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 19:20:51 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 19:20:51 +0000 |
commit | 7a4e206eb5fd6a85a6b3f483ca973047aeebc5d2 (patch) | |
tree | 8ac65556295426c1ad63118180046e3446a1da82 /ppapi | |
parent | 0d7291eed3ee74503e738c830301ba1efed09716 (diff) | |
download | chromium_src-7a4e206eb5fd6a85a6b3f483ca973047aeebc5d2.zip chromium_src-7a4e206eb5fd6a85a6b3f483ca973047aeebc5d2.tar.gz chromium_src-7a4e206eb5fd6a85a6b3f483ca973047aeebc5d2.tar.bz2 |
Convert InstancePrivate to IDL.
BUG=
Review URL: https://codereview.chromium.org/11013014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/private/ppp_instance_private.idl | 37 | ||||
-rw-r--r-- | ppapi/c/private/ppp_instance_private.h | 25 | ||||
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 25 | ||||
-rw-r--r-- | ppapi/proxy/ppp_instance_private_proxy.h | 3 |
4 files changed, 78 insertions, 12 deletions
diff --git a/ppapi/api/private/ppp_instance_private.idl b/ppapi/api/private/ppp_instance_private.idl new file mode 100644 index 0000000..aaa0060 --- /dev/null +++ b/ppapi/api/private/ppp_instance_private.idl @@ -0,0 +1,37 @@ +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * This file defines the PPP_InstancePrivate structure; a series of functions + * that a trusted plugin may implement to provide capabilities only available + * to trusted plugins. + */ +label Chrome { + M18 = 0.1 +}; + +/** + * The PPP_Instance_Private interface contains pointers to a series of + * functions that may be implemented in a trusted plugin to provide capabilities + * that aren't possible in untrusted modules. + */ + +interface PPP_Instance_Private { + /** + * GetInstanceObject returns a PP_Var representing the scriptable object for + * the given instance. Normally this will be a PPP_Class_Deprecated object + * that exposes methods and properties to JavaScript. + * + * On Failure, the returned PP_Var should be a "void" var. + * + * The returned PP_Var should have a reference added for the caller, which + * will be responsible for Release()ing that reference. + * + * @param[in] instance A PP_Instance indentifying the instance from which the + * instance object is being requested. + * @return A PP_Var containing scriptable object. + */ + PP_Var GetInstanceObject([in] PP_Instance instance); +}; diff --git a/ppapi/c/private/ppp_instance_private.h b/ppapi/c/private/ppp_instance_private.h index e587d26..aa439a0 100644 --- a/ppapi/c/private/ppp_instance_private.h +++ b/ppapi/c/private/ppp_instance_private.h @@ -1,35 +1,40 @@ -/* Copyright (c) 2011 The Chromium Authors. All rights reserved. +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + +/* From private/ppp_instance_private.idl modified Tue Oct 2 13:42:46 2012. */ + #ifndef PPAPI_C_PRIVATE_PPP_INSTANCE_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPP_INSTANCE_PRIVATE_H_ +#include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_var.h" -struct PP_Var; - -#define PPP_INSTANCE_PRIVATE_INTERFACE "PPP_Instance_Private;0.1" +#define PPP_INSTANCE_PRIVATE_INTERFACE_0_1 "PPP_Instance_Private;0.1" +#define PPP_INSTANCE_PRIVATE_INTERFACE PPP_INSTANCE_PRIVATE_INTERFACE_0_1 /** * @file * This file defines the PPP_InstancePrivate structure; a series of functions * that a trusted plugin may implement to provide capabilities only available * to trusted plugins. - * */ -/** @addtogroup Interfaces + +/** + * @addtogroup Interfaces * @{ */ - /** * The PPP_Instance_Private interface contains pointers to a series of * functions that may be implemented in a trusted plugin to provide capabilities * that aren't possible in untrusted modules. */ - -struct PPP_Instance_Private { +struct PPP_Instance_Private_0_1 { /** * GetInstanceObject returns a PP_Var representing the scriptable object for * the given instance. Normally this will be a PPP_Class_Deprecated object @@ -46,6 +51,8 @@ struct PPP_Instance_Private { */ struct PP_Var (*GetInstanceObject)(PP_Instance instance); }; + +typedef struct PPP_Instance_Private_0_1 PPP_Instance_Private; /** * @} */ diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 24089d2..2bd5916 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Last generated from IDL: Wed Oct 3 16:17:09 2012. */ +/* Last generated from IDL: Thu Oct 4 11:25:54 2012. */ #include "ppapi/generators/pnacl_shim.h" #include "ppapi/c/ppb.h" @@ -86,6 +86,7 @@ #include "ppapi/c/private/ppb_x509_certificate_private.h" #include "ppapi/c/private/ppp_content_decryptor_private.h" #include "ppapi/c/private/ppp_flash_browser_operations.h" +#include "ppapi/c/private/ppp_instance_private.h" #include "ppapi/c/trusted/ppb_audio_input_trusted_dev.h" #include "ppapi/c/trusted/ppb_audio_trusted.h" #include "ppapi/c/trusted/ppb_broker_trusted.h" @@ -234,6 +235,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_ContentDecryptor_Private_ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_3; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_Private_0_1; /* END Declarations for all Wrapper Infos. */ /* Not generating wrapper methods for PPB_Audio_1_0 */ @@ -3342,6 +3344,16 @@ static void Pnacl_M23_PPP_ContentDecryptor_Private_DecryptAndDecodeFrame(PP_Inst /* Not generating wrapper methods for PPP_Flash_BrowserOperations_1_3 */ +/* Begin wrapper methods for PPP_Instance_Private_0_1 */ + +static struct PP_Var Pnacl_M18_PPP_Instance_Private_GetInstanceObject(PP_Instance instance) { + const struct PPP_Instance_Private_0_1 *iface = Pnacl_WrapperInfo_PPP_Instance_Private_0_1.real_iface; + struct PP_Var (__attribute__((pnaclcall)) *temp_fp)(PP_Instance instance) = ((struct PP_Var (__attribute__((pnaclcall)) *)(PP_Instance instance))iface->GetInstanceObject); + return temp_fp(instance); +} + +/* End wrapper methods for PPP_Instance_Private_0_1 */ + /* Not generating wrapper interface for PPB_Audio_1_0 */ /* Not generating wrapper interface for PPB_AudioConfig_1_0 */ @@ -4116,6 +4128,10 @@ struct PPP_ContentDecryptor_Private_0_2 Pnacl_Wrappers_PPP_ContentDecryptor_Priv /* Not generating wrapper interface for PPP_Flash_BrowserOperations_1_3 */ +struct PPP_Instance_Private_0_1 Pnacl_Wrappers_PPP_Instance_Private_0_1 = { + .GetInstanceObject = (struct PP_Var (*)(PP_Instance instance))&Pnacl_M18_PPP_Instance_Private_GetInstanceObject +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Audio_1_0 = { .iface_macro = PPB_AUDIO_INTERFACE_1_0, .wrapped_iface = NULL /* Still need slot for real_iface */, @@ -4866,6 +4882,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1 .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_Private_0_1 = { + .iface_macro = PPP_INSTANCE_PRIVATE_INTERFACE_0_1, + .wrapped_iface = (void *) &Pnacl_Wrappers_PPP_Instance_Private_0_1, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_Audio_1_0, &Pnacl_WrapperInfo_PPB_AudioConfig_1_0, @@ -4996,6 +5018,7 @@ static struct __PnaclWrapperInfo *s_ppp_wrappers[] = { &Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_0, &Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_2, &Pnacl_WrapperInfo_PPP_Flash_BrowserOperations_1_3, + &Pnacl_WrapperInfo_PPP_Instance_Private_0_1, NULL }; diff --git a/ppapi/proxy/ppp_instance_private_proxy.h b/ppapi/proxy/ppp_instance_private_proxy.h index 1759eb9..60d5ea9 100644 --- a/ppapi/proxy/ppp_instance_private_proxy.h +++ b/ppapi/proxy/ppp_instance_private_proxy.h @@ -8,11 +8,10 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_var.h" +#include "ppapi/c/private/ppp_instance_private.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/shared_impl/host_resource.h" -struct PPP_Instance_Private; - namespace ppapi { namespace proxy { |