Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / renderer / pepper / resource_creation_impl.h
blobd2b20dd21777c17871c0237e4db37e6430f47d25
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 CONTENT_RENDERER_PEPPER_RESOURCE_CREATION_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_RESOURCE_CREATION_IMPL_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/thunk/resource_creation_api.h"
12 namespace content {
14 class PepperPluginInstanceImpl;
16 // This is an abstract class. ResourceCreationAPI functions that implement
17 // "old-style" resources are handled here. See
18 // content/renderer/pepper/pepper_in_process_resource_creation.h for functions
19 // that implement "new-style" resources.
20 class ResourceCreationImpl : public ppapi::thunk::ResourceCreationAPI {
21 public:
22 explicit ResourceCreationImpl(PepperPluginInstanceImpl* instance);
23 virtual ~ResourceCreationImpl();
25 // ResourceCreationAPI implementation.
26 virtual PP_Resource CreateAudio1_0(PP_Instance instance,
27 PP_Resource config_id,
28 PPB_Audio_Callback_1_0 audio_callback,
29 void* user_data) OVERRIDE;
30 virtual PP_Resource CreateAudio(PP_Instance instance,
31 PP_Resource config_id,
32 PPB_Audio_Callback audio_callback,
33 void* user_data) OVERRIDE;
34 virtual PP_Resource CreateAudioTrusted(PP_Instance instance) OVERRIDE;
35 virtual PP_Resource CreateAudioConfig(PP_Instance instance,
36 PP_AudioSampleRate sample_rate,
37 uint32_t sample_frame_count) OVERRIDE;
38 virtual PP_Resource CreateAudioInput(PP_Instance instance) OVERRIDE;
39 virtual PP_Resource CreateCompositor(PP_Instance instance) OVERRIDE;
40 virtual PP_Resource CreateBroker(PP_Instance instance) OVERRIDE;
41 virtual PP_Resource CreateBuffer(PP_Instance instance,
42 uint32_t size) OVERRIDE;
43 virtual PP_Resource CreateFlashDRM(PP_Instance instance) OVERRIDE;
44 virtual PP_Resource CreateFlashFontFile(
45 PP_Instance instance,
46 const PP_BrowserFont_Trusted_Description* description,
47 PP_PrivateFontCharset charset) OVERRIDE;
48 virtual PP_Resource CreateFlashMenu(PP_Instance instance,
49 const PP_Flash_Menu* menu_data) OVERRIDE;
50 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE;
51 virtual PP_Resource CreateGraphics3D(PP_Instance instance,
52 PP_Resource share_context,
53 const int32_t* attrib_list) OVERRIDE;
54 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance,
55 PP_Resource share_context,
56 const int32_t* attrib_list) OVERRIDE;
57 virtual PP_Resource CreateHostResolver(PP_Instance instance) OVERRIDE;
58 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) OVERRIDE;
59 virtual PP_Resource CreateImageData(PP_Instance instance,
60 PP_ImageDataFormat format,
61 const PP_Size* size,
62 PP_Bool init_to_zero) OVERRIDE;
63 virtual PP_Resource CreateImageDataSimple(PP_Instance instance,
64 PP_ImageDataFormat format,
65 const PP_Size* size,
66 PP_Bool init_to_zero) OVERRIDE;
67 virtual PP_Resource CreateIMEInputEvent(PP_Instance instance,
68 PP_InputEvent_Type type,
69 PP_TimeTicks time_stamp,
70 struct PP_Var text,
71 uint32_t segment_number,
72 const uint32_t* segment_offsets,
73 int32_t target_segment,
74 uint32_t selection_start,
75 uint32_t selection_end) OVERRIDE;
76 virtual PP_Resource CreateKeyboardInputEvent_1_0(PP_Instance instance,
77 PP_InputEvent_Type type,
78 PP_TimeTicks time_stamp,
79 uint32_t modifiers,
80 uint32_t key_code,
81 PP_Var character_text)
82 OVERRIDE;
83 virtual PP_Resource CreateKeyboardInputEvent_1_2(PP_Instance instance,
84 PP_InputEvent_Type type,
85 PP_TimeTicks time_stamp,
86 uint32_t modifiers,
87 uint32_t key_code,
88 PP_Var character_text,
89 PP_Var code) OVERRIDE;
90 virtual PP_Resource CreateMediaStreamVideoTrack(
91 PP_Instance instance) OVERRIDE;
92 virtual PP_Resource CreateMouseInputEvent(
93 PP_Instance instance,
94 PP_InputEvent_Type type,
95 PP_TimeTicks time_stamp,
96 uint32_t modifiers,
97 PP_InputEvent_MouseButton mouse_button,
98 const PP_Point* mouse_position,
99 int32_t click_count,
100 const PP_Point* mouse_movement) OVERRIDE;
101 virtual PP_Resource CreateNetAddressFromIPv4Address(
102 PP_Instance instance,
103 const PP_NetAddress_IPv4* ipv4_addr) OVERRIDE;
104 virtual PP_Resource CreateNetAddressFromIPv6Address(
105 PP_Instance instance,
106 const PP_NetAddress_IPv6* ipv6_addr) OVERRIDE;
107 virtual PP_Resource CreateNetAddressFromNetAddressPrivate(
108 PP_Instance instance,
109 const PP_NetAddress_Private& private_addr) OVERRIDE;
110 virtual PP_Resource CreateNetworkMonitor(PP_Instance instance) OVERRIDE;
111 virtual PP_Resource CreatePlatformVerificationPrivate(PP_Instance instance)
112 OVERRIDE;
113 virtual PP_Resource CreateScrollbar(PP_Instance instance,
114 PP_Bool vertical) OVERRIDE;
115 virtual PP_Resource CreateOutputProtectionPrivate(PP_Instance instance)
116 OVERRIDE;
117 virtual PP_Resource CreateTalk(PP_Instance instance) OVERRIDE;
118 virtual PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance)
119 OVERRIDE;
120 virtual PP_Resource CreateTCPSocket1_0(PP_Instance instance) OVERRIDE;
121 virtual PP_Resource CreateTCPSocket(PP_Instance instance) OVERRIDE;
122 virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instance) OVERRIDE;
123 virtual PP_Resource CreateTouchInputEvent(PP_Instance instance,
124 PP_InputEvent_Type type,
125 PP_TimeTicks time_stamp,
126 uint32_t modifiers) OVERRIDE;
127 virtual PP_Resource CreateUDPSocket(PP_Instance instance) OVERRIDE;
128 virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instance) OVERRIDE;
129 virtual PP_Resource CreateVideoCapture(PP_Instance instance) OVERRIDE;
130 virtual PP_Resource CreateVideoDecoder(PP_Instance instance) OVERRIDE;
131 virtual PP_Resource CreateVideoDecoderDev(PP_Instance instance,
132 PP_Resource graphics3d_id,
133 PP_VideoDecoder_Profile profile)
134 OVERRIDE;
135 virtual PP_Resource CreateVideoDestination(PP_Instance instance) OVERRIDE;
136 virtual PP_Resource CreateVideoSource(PP_Instance instance) OVERRIDE;
137 virtual PP_Resource CreateWheelInputEvent(PP_Instance instance,
138 PP_TimeTicks time_stamp,
139 uint32_t modifiers,
140 const PP_FloatPoint* wheel_delta,
141 const PP_FloatPoint* wheel_ticks,
142 PP_Bool scroll_by_page) OVERRIDE;
143 virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance)
144 OVERRIDE;
146 private:
147 DISALLOW_COPY_AND_ASSIGN(ResourceCreationImpl);
150 } // namespace content
152 #endif // CONTENT_RENDERER_PEPPER_RESOURCE_CREATION_IMPL_H_