| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_ | |
| 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_ | |
| 7 | |
| 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" | |
| 12 | |
| 13 namespace webkit { | |
| 14 namespace ppapi { | |
| 15 | |
| 16 class PluginInstanceImpl; | |
| 17 | |
| 18 // This is an abstract class. ResourceCreationAPI functions that implement | |
| 19 // "old-style" resources are handled here. See | |
| 20 // content/renderer/pepper/pepper_in_process_resource_creation.h for functions | |
| 21 // that implement "new-style" resources. | |
| 22 class WEBKIT_PLUGINS_EXPORT ResourceCreationImpl | |
| 23 : public NON_EXPORTED_BASE(::ppapi::thunk::ResourceCreationAPI) { | |
| 24 public: | |
| 25 explicit ResourceCreationImpl(PluginInstanceImpl* instance); | |
| 26 virtual ~ResourceCreationImpl(); | |
| 27 | |
| 28 // ResourceCreationAPI implementation. | |
| 29 virtual PP_Resource CreateAudio(PP_Instance instance, | |
| 30 PP_Resource config_id, | |
| 31 PPB_Audio_Callback audio_callback, | |
| 32 void* user_data) OVERRIDE; | |
| 33 virtual PP_Resource CreateAudioTrusted(PP_Instance instance) OVERRIDE; | |
| 34 virtual PP_Resource CreateAudioConfig(PP_Instance instance, | |
| 35 PP_AudioSampleRate sample_rate, | |
| 36 uint32_t sample_frame_count) OVERRIDE; | |
| 37 virtual PP_Resource CreateAudioInput(PP_Instance instance) OVERRIDE; | |
| 38 virtual PP_Resource CreateBroker(PP_Instance instance) OVERRIDE; | |
| 39 virtual PP_Resource CreateBuffer(PP_Instance instance, | |
| 40 uint32_t size) OVERRIDE; | |
| 41 virtual PP_Resource CreateFileRef(PP_Instance instance, | |
| 42 PP_Resource file_system, | |
| 43 const char* path) OVERRIDE; | |
| 44 virtual PP_Resource CreateFileRef( | |
| 45 const ::ppapi::PPB_FileRef_CreateInfo& serialized) OVERRIDE; | |
| 46 virtual PP_Resource CreateFlashDRM(PP_Instance instance) OVERRIDE; | |
| 47 virtual PP_Resource CreateFlashFontFile( | |
| 48 PP_Instance instance, | |
| 49 const PP_BrowserFont_Trusted_Description* description, | |
| 50 PP_PrivateFontCharset charset) OVERRIDE; | |
| 51 virtual PP_Resource CreateFlashMenu(PP_Instance instance, | |
| 52 const PP_Flash_Menu* menu_data) OVERRIDE; | |
| 53 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE; | |
| 54 virtual PP_Resource CreateGraphics3D(PP_Instance instance, | |
| 55 PP_Resource share_context, | |
| 56 const int32_t* attrib_list) OVERRIDE; | |
| 57 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance, | |
| 58 PP_Resource share_context, | |
| 59 const int32_t* attrib_list) OVERRIDE; | |
| 60 virtual PP_Resource CreateHostResolver(PP_Instance instance) OVERRIDE; | |
| 61 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) OVERRIDE; | |
| 62 virtual PP_Resource CreateImageData(PP_Instance instance, | |
| 63 PP_ImageDataFormat format, | |
| 64 const PP_Size* size, | |
| 65 PP_Bool init_to_zero) OVERRIDE; | |
| 66 virtual PP_Resource CreateImageDataSimple(PP_Instance instance, | |
| 67 PP_ImageDataFormat format, | |
| 68 const PP_Size* size, | |
| 69 PP_Bool init_to_zero) OVERRIDE; | |
| 70 virtual PP_Resource CreateIMEInputEvent(PP_Instance instance, | |
| 71 PP_InputEvent_Type type, | |
| 72 PP_TimeTicks time_stamp, | |
| 73 struct PP_Var text, | |
| 74 uint32_t segment_number, | |
| 75 const uint32_t* segment_offsets, | |
| 76 int32_t target_segment, | |
| 77 uint32_t selection_start, | |
| 78 uint32_t selection_end) OVERRIDE; | |
| 79 virtual PP_Resource CreateIsolatedFileSystem(PP_Instance instance, | |
| 80 const char* fsid) OVERRIDE; | |
| 81 virtual PP_Resource CreateKeyboardInputEvent( | |
| 82 PP_Instance instance, | |
| 83 PP_InputEvent_Type type, | |
| 84 PP_TimeTicks time_stamp, | |
| 85 uint32_t modifiers, | |
| 86 uint32_t key_code, | |
| 87 PP_Var character_text) OVERRIDE; | |
| 88 virtual PP_Resource CreateMouseInputEvent( | |
| 89 PP_Instance instance, | |
| 90 PP_InputEvent_Type type, | |
| 91 PP_TimeTicks time_stamp, | |
| 92 uint32_t modifiers, | |
| 93 PP_InputEvent_MouseButton mouse_button, | |
| 94 const PP_Point* mouse_position, | |
| 95 int32_t click_count, | |
| 96 const PP_Point* mouse_movement) OVERRIDE; | |
| 97 virtual PP_Resource CreateNetAddressFromIPv4Address( | |
| 98 PP_Instance instance, | |
| 99 const PP_NetAddress_IPv4* ipv4_addr) OVERRIDE; | |
| 100 virtual PP_Resource CreateNetAddressFromIPv6Address( | |
| 101 PP_Instance instance, | |
| 102 const PP_NetAddress_IPv6* ipv6_addr) OVERRIDE; | |
| 103 virtual PP_Resource CreateNetAddressFromNetAddressPrivate( | |
| 104 PP_Instance instance, | |
| 105 const PP_NetAddress_Private& private_addr) OVERRIDE; | |
| 106 virtual PP_Resource CreateTouchInputEvent( | |
| 107 PP_Instance instance, | |
| 108 PP_InputEvent_Type type, | |
| 109 PP_TimeTicks time_stamp, | |
| 110 uint32_t modifiers) OVERRIDE; | |
| 111 virtual PP_Resource CreateNetworkMonitor( | |
| 112 PP_Instance instance, | |
| 113 PPB_NetworkMonitor_Callback callback, | |
| 114 void* user_data) OVERRIDE; | |
| 115 virtual PP_Resource CreateResourceArray(PP_Instance instance, | |
| 116 const PP_Resource elements[], | |
| 117 uint32_t size) OVERRIDE; | |
| 118 virtual PP_Resource CreateScrollbar(PP_Instance instance, | |
| 119 PP_Bool vertical) OVERRIDE; | |
| 120 virtual PP_Resource CreateTalk(PP_Instance instance) OVERRIDE; | |
| 121 virtual PP_Resource CreateTCPServerSocketPrivate( | |
| 122 PP_Instance instance) OVERRIDE; | |
| 123 virtual PP_Resource CreateTCPSocket(PP_Instance instance) OVERRIDE; | |
| 124 virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instance) OVERRIDE; | |
| 125 virtual PP_Resource CreateUDPSocket(PP_Instance instance) OVERRIDE; | |
| 126 virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instance) OVERRIDE; | |
| 127 virtual PP_Resource CreateVideoCapture(PP_Instance instance) OVERRIDE; | |
| 128 virtual PP_Resource CreateVideoDecoder( | |
| 129 PP_Instance instance, | |
| 130 PP_Resource graphics3d_id, | |
| 131 PP_VideoDecoder_Profile profile) OVERRIDE; | |
| 132 virtual PP_Resource CreateVideoDestination( | |
| 133 PP_Instance instance) OVERRIDE; | |
| 134 virtual PP_Resource CreateVideoSource( | |
| 135 PP_Instance instance) OVERRIDE; | |
| 136 virtual PP_Resource CreateWheelInputEvent( | |
| 137 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( | |
| 144 PP_Instance instance) OVERRIDE; | |
| 145 | |
| 146 private: | |
| 147 DISALLOW_COPY_AND_ASSIGN(ResourceCreationImpl); | |
| 148 }; | |
| 149 | |
| 150 } // namespace ppapi | |
| 151 } // namespace webkit | |
| 152 | |
| 153 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_CREATION_IMPL_H_ | |
| OLD | NEW |