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 #ifndef PPAPI_THUNK_THUNK_H_
6 #define PPAPI_THUNK_THUNK_H_
8 #include "ppapi/c/private/ppb_instance_private.h"
9 #include "ppapi/c/trusted/ppb_audio_trusted.h"
10 #include "ppapi/c/trusted/ppb_buffer_trusted.h"
11 #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h"
12 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
13 #include "ppapi/c/trusted/ppb_url_loader_trusted.h"
14 #include "ppapi/thunk/ppapi_thunk_export.h"
16 // Declares a getter for the interface thunk of the form:
18 // const PPB_Foo* ppapi::thunk::GetPPB_Foo_Thunk();
20 #define IFACE(api_name, interface_name, InterfaceType) \
21 struct InterfaceType; \
22 namespace ppapi { namespace thunk { \
23 PPAPI_THUNK_EXPORT const InterfaceType* Get##InterfaceType##_Thunk(); \
25 #define PROXIED_IFACE IFACE
26 #define UNPROXIED_IFACE IFACE
28 #include "ppapi/thunk/interfaces_ppb_private.h"
29 #include "ppapi/thunk/interfaces_ppb_private_no_permissions.h"
30 #include "ppapi/thunk/interfaces_ppb_private_flash.h"
31 #include "ppapi/thunk/interfaces_ppb_public_stable.h"
32 #include "ppapi/thunk/interfaces_ppb_public_dev.h"
34 #undef UNPROXIED_IFACE
41 // Old-style thunk getters. Only put trusted/private stuff here (it hasn't
42 // yet been converted to the new system). Otherwise, add the declaration to
43 // the appropriate interfaces_*.h file.
44 PPAPI_THUNK_EXPORT
const PPB_AudioTrusted_0_6
* GetPPB_AudioTrusted_0_6_Thunk();
45 PPAPI_THUNK_EXPORT
const PPB_BufferTrusted_0_1
*
46 GetPPB_BufferTrusted_0_1_Thunk();
47 PPAPI_THUNK_EXPORT
const PPB_Graphics3DTrusted_1_0
*
48 GetPPB_Graphics3DTrusted_1_0_Thunk();
49 PPAPI_THUNK_EXPORT
const PPB_ImageDataTrusted_0_4
*
50 GetPPB_ImageDataTrusted_0_4_Thunk();
51 PPAPI_THUNK_EXPORT
const PPB_Instance_Private_0_1
*
52 GetPPB_Instance_Private_0_1_Thunk();
53 PPAPI_THUNK_EXPORT
const PPB_URLLoaderTrusted_0_3
*
54 GetPPB_URLLoaderTrusted_0_3_Thunk();
59 #endif // PPAPI_THUNK_THUNK_H_