OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // From dev/ppb_graphics_2d_dev.idl modified Fri Nov 8 13:58:50 2013. | 5 // From dev/ppb_graphics_2d_dev.idl modified Mon Nov 25 11:02:23 2013. |
6 | 6 |
7 #include "ppapi/c/dev/ppb_graphics_2d_dev.h" | 7 #include "ppapi/c/dev/ppb_graphics_2d_dev.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
| 11 #include "ppapi/thunk/ppapi_thunk_export.h" |
11 #include "ppapi/thunk/ppb_graphics_2d_api.h" | 12 #include "ppapi/thunk/ppb_graphics_2d_api.h" |
12 #include "ppapi/thunk/ppb_instance_api.h" | |
13 #include "ppapi/thunk/resource_creation_api.h" | |
14 #include "ppapi/thunk/thunk.h" | |
15 | 13 |
16 namespace ppapi { | 14 namespace ppapi { |
17 namespace thunk { | 15 namespace thunk { |
18 | 16 |
19 namespace { | 17 namespace { |
20 | 18 |
21 PP_Bool SetScale(PP_Resource resource, float scale) { | 19 PP_Bool SetScale(PP_Resource resource, float scale) { |
22 VLOG(4) << "PPB_Graphics2D_Dev::SetScale()"; | 20 VLOG(4) << "PPB_Graphics2D_Dev::SetScale()"; |
23 EnterResource<PPB_Graphics2D_API> enter(resource, true); | 21 EnterResource<PPB_Graphics2D_API> enter(resource, true); |
24 if (enter.failed()) | 22 if (enter.failed()) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 57 |
60 const PPB_Graphics2D_Dev_0_2 g_ppb_graphics2d_dev_thunk_0_2 = { | 58 const PPB_Graphics2D_Dev_0_2 g_ppb_graphics2d_dev_thunk_0_2 = { |
61 &SetScale, | 59 &SetScale, |
62 &GetScale, | 60 &GetScale, |
63 &SetOffset, | 61 &SetOffset, |
64 &SetResizeMode | 62 &SetResizeMode |
65 }; | 63 }; |
66 | 64 |
67 } // namespace | 65 } // namespace |
68 | 66 |
69 const PPB_Graphics2D_Dev_0_1* GetPPB_Graphics2D_Dev_0_1_Thunk() { | 67 PPAPI_THUNK_EXPORT const PPB_Graphics2D_Dev_0_1* |
| 68 GetPPB_Graphics2D_Dev_0_1_Thunk() { |
70 return &g_ppb_graphics2d_dev_thunk_0_1; | 69 return &g_ppb_graphics2d_dev_thunk_0_1; |
71 } | 70 } |
72 | 71 |
73 const PPB_Graphics2D_Dev_0_2* GetPPB_Graphics2D_Dev_0_2_Thunk() { | 72 PPAPI_THUNK_EXPORT const PPB_Graphics2D_Dev_0_2* |
| 73 GetPPB_Graphics2D_Dev_0_2_Thunk() { |
74 return &g_ppb_graphics2d_dev_thunk_0_2; | 74 return &g_ppb_graphics2d_dev_thunk_0_2; |
75 } | 75 } |
76 | 76 |
77 } // namespace thunk | 77 } // namespace thunk |
78 } // namespace ppapi | 78 } // namespace ppapi |
OLD | NEW |