| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 5 #ifndef PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| 6 #define PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 6 #define PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" | 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
| 9 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" | 9 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" |
| 10 #include "ppapi/c/dev/ppb_video_layer_dev.h" | 10 #include "ppapi/c/dev/ppb_video_layer_dev.h" |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
| 14 #include "ppapi/c/ppb_audio.h" | 14 #include "ppapi/c/ppb_audio.h" |
| 15 #include "ppapi/c/ppb_audio_config.h" | 15 #include "ppapi/c/ppb_audio_config.h" |
| 16 #include "ppapi/c/ppb_file_system.h" | 16 #include "ppapi/c/ppb_file_system.h" |
| 17 #include "ppapi/c/ppb_image_data.h" | 17 #include "ppapi/c/ppb_image_data.h" |
| 18 #include "ppapi/c/ppb_input_event.h" | 18 #include "ppapi/c/ppb_input_event.h" |
| 19 #include "ppapi/proxy/interface_id.h" | 19 #include "ppapi/proxy/interface_id.h" |
| 20 | 20 |
| 21 struct PP_Flash_Menu; | 21 struct PP_Flash_Menu; |
| 22 struct PP_FontDescription_Dev; | 22 struct PP_FontDescription_Dev; |
| 23 struct PP_VideoCaptureDeviceInfo_Dev; | 23 struct PP_VideoCaptureDeviceInfo_Dev; |
| 24 struct PP_Size; | 24 struct PP_Size; |
| 25 | 25 |
| 26 namespace ppapi { | 26 namespace ppapi { |
| 27 |
| 28 struct PPB_URLRequestInfo_Data; |
| 29 |
| 27 namespace thunk { | 30 namespace thunk { |
| 28 | 31 |
| 29 // A functional API for creating resource types. Separating out the creation | 32 // A functional API for creating resource types. Separating out the creation |
| 30 // functions here allows us to implement most resources as a pure "resource | 33 // functions here allows us to implement most resources as a pure "resource |
| 31 // API", meaning all calls are routed on a per-resource-object basis. The | 34 // API", meaning all calls are routed on a per-resource-object basis. The |
| 32 // creation functions are not per-object (since there's no object during | 35 // creation functions are not per-object (since there's no object during |
| 33 // creation) so need functional routing based on the instance ID. | 36 // creation) so need functional routing based on the instance ID. |
| 34 class ResourceCreationAPI { | 37 class ResourceCreationAPI { |
| 35 public: | 38 public: |
| 36 virtual ~ResourceCreationAPI() {} | 39 virtual ~ResourceCreationAPI() {} |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 int32_t click_count) = 0; | 104 int32_t click_count) = 0; |
| 102 virtual PP_Resource CreateScrollbar(PP_Instance instance, | 105 virtual PP_Resource CreateScrollbar(PP_Instance instance, |
| 103 PP_Bool vertical) = 0; | 106 PP_Bool vertical) = 0; |
| 104 virtual PP_Resource CreateSurface3D(PP_Instance instance, | 107 virtual PP_Resource CreateSurface3D(PP_Instance instance, |
| 105 PP_Config3D_Dev config, | 108 PP_Config3D_Dev config, |
| 106 const int32_t* attrib_list) = 0; | 109 const int32_t* attrib_list) = 0; |
| 107 virtual PP_Resource CreateTransport(PP_Instance instance, | 110 virtual PP_Resource CreateTransport(PP_Instance instance, |
| 108 const char* name, | 111 const char* name, |
| 109 const char* proto) = 0; | 112 const char* proto) = 0; |
| 110 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; | 113 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; |
| 111 virtual PP_Resource CreateURLRequestInfo(PP_Instance instance) = 0; | 114 virtual PP_Resource CreateURLRequestInfo( |
| 115 PP_Instance instance, |
| 116 const PPB_URLRequestInfo_Data& data) = 0; |
| 112 virtual PP_Resource CreateVideoCapture(PP_Instance instance) = 0; | 117 virtual PP_Resource CreateVideoCapture(PP_Instance instance) = 0; |
| 113 virtual PP_Resource CreateVideoDecoder( | 118 virtual PP_Resource CreateVideoDecoder( |
| 114 PP_Instance instance, | 119 PP_Instance instance, |
| 115 PP_Resource context3d_id, | 120 PP_Resource context3d_id, |
| 116 const PP_VideoConfigElement* config) = 0; | 121 const PP_VideoConfigElement* config) = 0; |
| 117 virtual PP_Resource CreateVideoLayer(PP_Instance instance, | 122 virtual PP_Resource CreateVideoLayer(PP_Instance instance, |
| 118 PP_VideoLayerMode_Dev mode) = 0; | 123 PP_VideoLayerMode_Dev mode) = 0; |
| 119 virtual PP_Resource CreateWheelInputEvent( | 124 virtual PP_Resource CreateWheelInputEvent( |
| 120 PP_Instance instance, | 125 PP_Instance instance, |
| 121 PP_TimeTicks time_stamp, | 126 PP_TimeTicks time_stamp, |
| 122 uint32_t modifiers, | 127 uint32_t modifiers, |
| 123 const PP_FloatPoint* wheel_delta, | 128 const PP_FloatPoint* wheel_delta, |
| 124 const PP_FloatPoint* wheel_ticks, | 129 const PP_FloatPoint* wheel_ticks, |
| 125 PP_Bool scroll_by_page) = 0; | 130 PP_Bool scroll_by_page) = 0; |
| 126 | 131 |
| 127 static const proxy::InterfaceID interface_id = | 132 static const proxy::InterfaceID interface_id = |
| 128 proxy::INTERFACE_ID_RESOURCE_CREATION; | 133 proxy::INTERFACE_ID_RESOURCE_CREATION; |
| 129 }; | 134 }; |
| 130 | 135 |
| 131 } // namespace thunk | 136 } // namespace thunk |
| 132 } // namespace ppapi | 137 } // namespace ppapi |
| 133 | 138 |
| 134 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 139 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| OLD | NEW |