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 WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/thunk/resource_creation_api.h"
11 #include "webkit/plugins/webkit_plugins_export.h"
18 class WEBKIT_PLUGINS_EXPORT ResourceCreationImpl
19 : public NON_EXPORTED_BASE(::ppapi::thunk::ResourceCreationAPI
) {
21 explicit ResourceCreationImpl(PluginInstance
* instance
);
22 virtual ~ResourceCreationImpl();
24 // ResourceCreationAPI implementation.
25 virtual PP_Resource
CreateAudio(PP_Instance instance
,
26 PP_Resource config_id
,
27 PPB_Audio_Callback audio_callback
,
28 void* user_data
) OVERRIDE
;
29 virtual PP_Resource
CreateAudioTrusted(PP_Instance instance
) OVERRIDE
;
30 virtual PP_Resource
CreateAudioConfig(PP_Instance instance
,
31 PP_AudioSampleRate sample_rate
,
32 uint32_t sample_frame_count
) OVERRIDE
;
33 virtual PP_Resource
CreateAudioInput(PP_Instance instance
) OVERRIDE
;
34 virtual PP_Resource
CreateBroker(PP_Instance instance
) OVERRIDE
;
35 virtual PP_Resource
CreateBuffer(PP_Instance instance
,
36 uint32_t size
) OVERRIDE
;
37 virtual PP_Resource
CreateDirectoryReader(PP_Resource directory_ref
) OVERRIDE
;
38 virtual PP_Resource
CreateFileRef(PP_Resource file_system
,
39 const char* path
) OVERRIDE
;
40 virtual PP_Resource
CreateFileSystem(PP_Instance instance
,
41 PP_FileSystemType type
) OVERRIDE
;
42 virtual PP_Resource
CreateFlashDeviceID(PP_Instance instance
) OVERRIDE
;
43 virtual PP_Resource
CreateFlashFontFile(
45 const PP_BrowserFont_Trusted_Description
* description
,
46 PP_PrivateFontCharset charset
) OVERRIDE
;
47 virtual PP_Resource
CreateFlashMenu(PP_Instance instance
,
48 const PP_Flash_Menu
* menu_data
) OVERRIDE
;
49 virtual PP_Resource
CreateFlashMessageLoop(PP_Instance instance
) OVERRIDE
;
50 virtual PP_Resource
CreateGraphics3D(PP_Instance instance
,
51 PP_Resource share_context
,
52 const int32_t* attrib_list
) OVERRIDE
;
53 virtual PP_Resource
CreateGraphics3DRaw(PP_Instance instance
,
54 PP_Resource share_context
,
55 const int32_t* attrib_list
) OVERRIDE
;
56 virtual PP_Resource
CreateHostResolverPrivate(PP_Instance instance
) OVERRIDE
;
57 virtual PP_Resource
CreateImageData(PP_Instance instance
,
58 PP_ImageDataFormat format
,
60 PP_Bool init_to_zero
) OVERRIDE
;
61 virtual PP_Resource
CreateImageDataNaCl(PP_Instance instance
,
62 PP_ImageDataFormat format
,
64 PP_Bool init_to_zero
) OVERRIDE
;
65 virtual PP_Resource
CreateIMEInputEvent(PP_Instance instance
,
66 PP_InputEvent_Type type
,
67 PP_TimeTicks time_stamp
,
69 uint32_t segment_number
,
70 const uint32_t* segment_offsets
,
71 int32_t target_segment
,
72 uint32_t selection_start
,
73 uint32_t selection_end
) OVERRIDE
;
74 virtual PP_Resource
CreateKeyboardInputEvent(
76 PP_InputEvent_Type type
,
77 PP_TimeTicks time_stamp
,
80 PP_Var character_text
) OVERRIDE
;
81 virtual PP_Resource
CreateMouseInputEvent(
83 PP_InputEvent_Type type
,
84 PP_TimeTicks time_stamp
,
86 PP_InputEvent_MouseButton mouse_button
,
87 const PP_Point
* mouse_position
,
89 const PP_Point
* mouse_movement
) OVERRIDE
;
90 virtual PP_Resource
CreateTouchInputEvent(
92 PP_InputEvent_Type type
,
93 PP_TimeTicks time_stamp
,
94 uint32_t modifiers
) OVERRIDE
;
95 virtual PP_Resource
CreateNetworkMonitor(
97 PPB_NetworkMonitor_Callback callback
,
98 void* user_data
) OVERRIDE
;
99 virtual PP_Resource
CreateResourceArray(PP_Instance instance
,
100 const PP_Resource elements
[],
101 uint32_t size
) OVERRIDE
;
102 virtual PP_Resource
CreateScrollbar(PP_Instance instance
,
103 PP_Bool vertical
) OVERRIDE
;
104 virtual PP_Resource
CreateTalk(PP_Instance instance
) OVERRIDE
;
105 virtual PP_Resource
CreateTCPServerSocketPrivate(
106 PP_Instance instance
) OVERRIDE
;
107 virtual PP_Resource
CreateTCPSocketPrivate(PP_Instance instance
) OVERRIDE
;
108 virtual PP_Resource
CreateURLLoader(PP_Instance instance
) OVERRIDE
;
109 virtual PP_Resource
CreateVideoCapture(PP_Instance instance
) OVERRIDE
;
110 virtual PP_Resource
CreateVideoDecoder(
111 PP_Instance instance
,
112 PP_Resource graphics3d_id
,
113 PP_VideoDecoder_Profile profile
) OVERRIDE
;
114 virtual PP_Resource
CreateWheelInputEvent(
115 PP_Instance instance
,
116 PP_TimeTicks time_stamp
,
118 const PP_FloatPoint
* wheel_delta
,
119 const PP_FloatPoint
* wheel_ticks
,
120 PP_Bool scroll_by_page
) OVERRIDE
;
121 virtual PP_Resource
CreateX509CertificatePrivate(
122 PP_Instance instance
) OVERRIDE
;
125 DISALLOW_COPY_AND_ASSIGN(ResourceCreationImpl
);
129 } // namespace webkit
131 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_