[ServiceWorker] Implement WebServiceWorkerContextClient::openWindow().
[chromium-blink-merge.git] / content / renderer / pepper / resource_creation_impl.h
blob52c44fc06f14f08d0e56e8ee9a1bde77dbbe0e08
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 ~ResourceCreationImpl() override;
25 // ResourceCreationAPI implementation.
26 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 PP_Resource CreateAudio(PP_Instance instance,
31 PP_Resource config_id,
32 PPB_Audio_Callback audio_callback,
33 void* user_data) override;
34 PP_Resource CreateAudioTrusted(PP_Instance instance) override;
35 PP_Resource CreateAudioConfig(PP_Instance instance,
36 PP_AudioSampleRate sample_rate,
37 uint32_t sample_frame_count) override;
38 PP_Resource CreateAudioInput(PP_Instance instance) override;
39 PP_Resource CreateCompositor(PP_Instance instance) override;
40 PP_Resource CreateBroker(PP_Instance instance) override;
41 PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) override;
42 PP_Resource CreateFlashDRM(PP_Instance instance) override;
43 PP_Resource CreateFlashFontFile(
44 PP_Instance instance,
45 const PP_BrowserFont_Trusted_Description* description,
46 PP_PrivateFontCharset charset) override;
47 PP_Resource CreateFlashMenu(PP_Instance instance,
48 const PP_Flash_Menu* menu_data) override;
49 PP_Resource CreateFlashMessageLoop(PP_Instance instance) override;
50 PP_Resource CreateGraphics3D(PP_Instance instance,
51 PP_Resource share_context,
52 const int32_t* attrib_list) override;
53 PP_Resource CreateGraphics3DRaw(
54 PP_Instance instance,
55 PP_Resource share_context,
56 const int32_t* attrib_list,
57 gpu::Capabilities* capabilities,
58 base::SharedMemoryHandle* shared_state) override;
59 PP_Resource CreateHostResolver(PP_Instance instance) override;
60 PP_Resource CreateHostResolverPrivate(PP_Instance instance) override;
61 PP_Resource CreateImageData(PP_Instance instance,
62 PP_ImageDataFormat format,
63 const PP_Size* size,
64 PP_Bool init_to_zero) override;
65 PP_Resource CreateImageDataSimple(PP_Instance instance,
66 PP_ImageDataFormat format,
67 const PP_Size* size,
68 PP_Bool init_to_zero) override;
69 PP_Resource CreateIMEInputEvent(PP_Instance instance,
70 PP_InputEvent_Type type,
71 PP_TimeTicks time_stamp,
72 struct PP_Var text,
73 uint32_t segment_number,
74 const uint32_t* segment_offsets,
75 int32_t target_segment,
76 uint32_t selection_start,
77 uint32_t selection_end) override;
78 PP_Resource CreateKeyboardInputEvent_1_0(PP_Instance instance,
79 PP_InputEvent_Type type,
80 PP_TimeTicks time_stamp,
81 uint32_t modifiers,
82 uint32_t key_code,
83 PP_Var character_text) override;
84 PP_Resource CreateKeyboardInputEvent_1_2(PP_Instance instance,
85 PP_InputEvent_Type type,
86 PP_TimeTicks time_stamp,
87 uint32_t modifiers,
88 uint32_t key_code,
89 PP_Var character_text,
90 PP_Var code) override;
91 PP_Resource CreateMediaStreamVideoTrack(PP_Instance instance) override;
92 PP_Resource CreateMouseInputEvent(PP_Instance instance,
93 PP_InputEvent_Type type,
94 PP_TimeTicks time_stamp,
95 uint32_t modifiers,
96 PP_InputEvent_MouseButton mouse_button,
97 const PP_Point* mouse_position,
98 int32_t click_count,
99 const PP_Point* mouse_movement) override;
100 PP_Resource CreateNetAddressFromIPv4Address(
101 PP_Instance instance,
102 const PP_NetAddress_IPv4* ipv4_addr) override;
103 PP_Resource CreateNetAddressFromIPv6Address(
104 PP_Instance instance,
105 const PP_NetAddress_IPv6* ipv6_addr) override;
106 PP_Resource CreateNetAddressFromNetAddressPrivate(
107 PP_Instance instance,
108 const PP_NetAddress_Private& private_addr) override;
109 PP_Resource CreateNetworkMonitor(PP_Instance instance) override;
110 PP_Resource CreatePlatformVerificationPrivate(PP_Instance instance) override;
111 PP_Resource CreateScrollbar(PP_Instance instance, PP_Bool vertical) override;
112 PP_Resource CreateOutputProtectionPrivate(PP_Instance instance) override;
113 PP_Resource CreateTalk(PP_Instance instance) override;
114 PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance) override;
115 PP_Resource CreateTCPSocket1_0(PP_Instance instance) override;
116 PP_Resource CreateTCPSocket(PP_Instance instance) override;
117 PP_Resource CreateTCPSocketPrivate(PP_Instance instance) override;
118 PP_Resource CreateTouchInputEvent(PP_Instance instance,
119 PP_InputEvent_Type type,
120 PP_TimeTicks time_stamp,
121 uint32_t modifiers) override;
122 PP_Resource CreateUDPSocket(PP_Instance instance) override;
123 PP_Resource CreateUDPSocketPrivate(PP_Instance instance) override;
124 PP_Resource CreateVideoCapture(PP_Instance instance) override;
125 PP_Resource CreateVideoDecoder(PP_Instance instance) override;
126 PP_Resource CreateVideoDecoderDev(PP_Instance instance,
127 PP_Resource graphics3d_id,
128 PP_VideoDecoder_Profile profile) override;
129 PP_Resource CreateVideoDestination(PP_Instance instance) override;
130 PP_Resource CreateVideoSource(PP_Instance instance) override;
131 PP_Resource CreateWheelInputEvent(PP_Instance instance,
132 PP_TimeTicks time_stamp,
133 uint32_t modifiers,
134 const PP_FloatPoint* wheel_delta,
135 const PP_FloatPoint* wheel_ticks,
136 PP_Bool scroll_by_page) override;
137 PP_Resource CreateX509CertificatePrivate(PP_Instance instance) override;
139 private:
140 DISALLOW_COPY_AND_ASSIGN(ResourceCreationImpl);
143 } // namespace content
145 #endif // CONTENT_RENDERER_PEPPER_RESOURCE_CREATION_IMPL_H_