OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 #include "ppapi/thunk/thunk.h" | 5 #include "ppapi/thunk/thunk.h" |
6 #include "ppapi/thunk/enter.h" | 6 #include "ppapi/thunk/enter.h" |
7 #include "ppapi/thunk/ppb_instance_api.h" | 7 #include "ppapi/thunk/ppb_instance_api.h" |
8 #include "ppapi/thunk/resource_creation_api.h" | 8 #include "ppapi/thunk/resource_creation_api.h" |
9 | 9 |
10 namespace ppapi { | 10 namespace ppapi { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 PP_Var ExecuteScript(PP_Instance instance, | 43 PP_Var ExecuteScript(PP_Instance instance, |
44 PP_Var script, | 44 PP_Var script, |
45 PP_Var* exception) { | 45 PP_Var* exception) { |
46 EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); | 46 EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); |
47 if (enter.failed()) | 47 if (enter.failed()) |
48 return PP_MakeUndefined(); | 48 return PP_MakeUndefined(); |
49 return enter.functions()->ExecuteScript(instance, script, exception); | 49 return enter.functions()->ExecuteScript(instance, script, exception); |
50 } | 50 } |
51 | 51 |
52 const PPB_Instance_0_5 g_ppb_instance_0_5_thunk = { | 52 const PPB_Instance_1_0 g_ppb_instance_1_0_thunk = { |
53 &BindGraphics, | 53 &BindGraphics, |
54 &IsFullFrame | 54 &IsFullFrame |
55 }; | 55 }; |
56 | 56 |
57 const PPB_Instance_0_4 g_ppb_instance_0_4_thunk = { | 57 const PPB_Instance_0_4 g_ppb_instance_0_4_thunk = { |
58 &GetWindowObject, | 58 &GetWindowObject, |
59 &GetOwnerElementObject, | 59 &GetOwnerElementObject, |
60 &BindGraphics, | 60 &BindGraphics, |
61 &IsFullFrame, | 61 &IsFullFrame, |
62 &ExecuteScript | 62 &ExecuteScript |
63 }; | 63 }; |
64 | 64 |
65 const PPB_Instance_Private g_ppb_instance_private_thunk = { | 65 const PPB_Instance_Private g_ppb_instance_private_thunk = { |
66 &GetWindowObject, | 66 &GetWindowObject, |
67 &GetOwnerElementObject, | 67 &GetOwnerElementObject, |
68 &ExecuteScript | 68 &ExecuteScript |
69 }; | 69 }; |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 const PPB_Instance_0_4* GetPPB_Instance_0_4_Thunk() { | 73 const PPB_Instance_0_4* GetPPB_Instance_0_4_Thunk() { |
74 return &g_ppb_instance_0_4_thunk; | 74 return &g_ppb_instance_0_4_thunk; |
75 } | 75 } |
76 const PPB_Instance_0_5* GetPPB_Instance_0_5_Thunk() { | 76 const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() { |
77 return &g_ppb_instance_0_5_thunk; | 77 return &g_ppb_instance_1_0_thunk; |
78 } | 78 } |
79 const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() { | 79 const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() { |
80 return &g_ppb_instance_private_thunk; | 80 return &g_ppb_instance_private_thunk; |
81 } | 81 } |
82 | 82 |
83 } // namespace thunk | 83 } // namespace thunk |
84 } // namespace ppapi | 84 } // namespace ppapi |
OLD | NEW |