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 g_ppb_instance_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_Private g_ppb_instance_private_thunk = { | 57 const PPB_Instance_Private g_ppb_instance_private_thunk = { |
58 &GetWindowObject, | 58 &GetWindowObject, |
59 &GetOwnerElementObject, | 59 &GetOwnerElementObject, |
60 &ExecuteScript | 60 &ExecuteScript |
61 }; | 61 }; |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 const PPB_Instance* GetPPB_Instance_Thunk() { | 65 const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() { |
66 return &g_ppb_instance_thunk; | 66 return &g_ppb_instance_1_0_thunk; |
67 } | 67 } |
68 const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() { | 68 const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() { |
69 return &g_ppb_instance_private_thunk; | 69 return &g_ppb_instance_private_thunk; |
70 } | 70 } |
71 | 71 |
72 } // namespace thunk | 72 } // namespace thunk |
73 } // namespace ppapi | 73 } // namespace ppapi |
OLD | NEW |