Fix build break
[chromium-blink-merge.git] / ppapi / c / private / ppb_instance_private.h
blob561374da607a0e97f20a438566c85ebd7af9deb7
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
3 * found in the LICENSE file.
4 */
6 /* From private/ppb_instance_private.idl modified Mon Oct 8 10:50:04 2012. */
8 #ifndef PPAPI_C_PRIVATE_PPB_INSTANCE_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_INSTANCE_PRIVATE_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_var.h"
17 #define PPB_INSTANCE_PRIVATE_INTERFACE_0_1 "PPB_Instance_Private;0.1"
18 #define PPB_INSTANCE_PRIVATE_INTERFACE PPB_INSTANCE_PRIVATE_INTERFACE_0_1
20 /**
21 * @file
22 * This file defines the PPB_Instance_Private interface implemented by the
23 * browser and containing pointers to functions available only to trusted plugin
24 * instances.
28 /**
29 * @addtogroup Interfaces
30 * @{
32 /**
33 * The PPB_Instance_Private interface contains functions available only to
34 * trusted plugin instances.
37 struct PPB_Instance_Private_0_1 {
38 /**
39 * GetWindowObject is a pointer to a function that determines
40 * the DOM window containing this module instance.
42 * @param[in] instance A PP_Instance whose WindowObject should be retrieved.
43 * @return A PP_Var containing window object on success.
45 struct PP_Var (*GetWindowObject)(PP_Instance instance);
46 /**
47 * GetOwnerElementObject is a pointer to a function that determines
48 * the DOM element containing this module instance.
50 * @param[in] instance A PP_Instance whose WindowObject should be retrieved.
51 * @return A PP_Var containing DOM element on success.
53 struct PP_Var (*GetOwnerElementObject)(PP_Instance instance);
54 /**
55 * ExecuteScript is a pointer to a function that executes the given
56 * script in the context of the frame containing the module.
58 * The exception, if any, will be returned in *exception. As with the PPB_Var
59 * interface, the exception parameter, if non-NULL, must be initialized
60 * to a "void" var or the function will immediately return. On success,
61 * the exception parameter will be set to a "void" var. On failure, the
62 * return value will be a "void" var.
64 * @param[in] script A string containing the JavaScript to execute.
65 * @param[in/out] exception PP_Var containing the exception. Initialize
66 * this to NULL if you don't want exception info; initialize this to a void
67 * exception if want exception info.
69 * @return The result of the script execution, or a "void" var
70 * if execution failed.
72 struct PP_Var (*ExecuteScript)(PP_Instance instance,
73 struct PP_Var script,
74 struct PP_Var* exception);
77 typedef struct PPB_Instance_Private_0_1 PPB_Instance_Private;
78 /**
79 * @}
82 #endif /* PPAPI_C_PRIVATE_PPB_INSTANCE_PRIVATE_H_ */