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.
5 #include "ppapi/thunk/thunk.h"
6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_instance_api.h"
8 #include "ppapi/thunk/resource_creation_api.h"
15 PP_Var
GetWindowObject(PP_Instance instance
) {
16 EnterInstance
enter(instance
);
18 return PP_MakeUndefined();
19 return enter
.functions()->GetWindowObject(instance
);
22 PP_Var
GetOwnerElementObject(PP_Instance instance
) {
23 EnterInstance
enter(instance
);
25 return PP_MakeUndefined();
26 return enter
.functions()->GetOwnerElementObject(instance
);
29 PP_Bool
BindGraphics(PP_Instance instance
, PP_Resource graphics_id
) {
30 EnterInstance
enter(instance
);
33 return enter
.functions()->BindGraphics(instance
, graphics_id
);
36 PP_Bool
IsFullFrame(PP_Instance instance
) {
37 EnterInstance
enter(instance
);
40 return enter
.functions()->IsFullFrame(instance
);
43 PP_Var
ExecuteScript(PP_Instance instance
,
46 EnterInstance
enter(instance
);
48 return PP_MakeUndefined();
49 return enter
.functions()->ExecuteScript(instance
, script
, exception
);
52 const PPB_Instance g_ppb_instance_thunk
= {
57 const PPB_Instance_Private g_ppb_instance_private_thunk
= {
59 &GetOwnerElementObject
,
65 const PPB_Instance_1_0
* GetPPB_Instance_1_0_Thunk() {
66 return &g_ppb_instance_thunk
;
68 const PPB_Instance_Private_0_1
* GetPPB_Instance_Private_0_1_Thunk() {
69 return &g_ppb_instance_private_thunk
;