| 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 #include "ppapi/proxy/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
| 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
| 10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
| 11 #include "ppapi/proxy/plugin_resource_tracker.h" | 11 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 12 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
| 13 #include "ppapi/proxy/ppb_audio_proxy.h" | 13 #include "ppapi/proxy/ppb_audio_proxy.h" |
| 14 #include "ppapi/proxy/ppb_buffer_proxy.h" | 14 #include "ppapi/proxy/ppb_buffer_proxy.h" |
| 15 #include "ppapi/proxy/ppb_broker_proxy.h" | 15 #include "ppapi/proxy/ppb_broker_proxy.h" |
| 16 #include "ppapi/proxy/ppb_context_3d_proxy.h" | 16 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
| 17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
| 18 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 18 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
| 19 #include "ppapi/proxy/ppb_file_system_proxy.h" | 19 #include "ppapi/proxy/ppb_file_system_proxy.h" |
| 20 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 20 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
| 21 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" | 21 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
| 22 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" | |
| 23 #include "ppapi/proxy/ppb_flash_udp_socket_proxy.h" | |
| 24 #include "ppapi/proxy/ppb_font_proxy.h" | 22 #include "ppapi/proxy/ppb_font_proxy.h" |
| 25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 23 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
| 26 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 24 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
| 27 #include "ppapi/proxy/ppb_image_data_proxy.h" | 25 #include "ppapi/proxy/ppb_image_data_proxy.h" |
| 28 #include "ppapi/proxy/ppb_surface_3d_proxy.h" | 26 #include "ppapi/proxy/ppb_surface_3d_proxy.h" |
| 27 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
| 28 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" |
| 29 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 29 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
| 30 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 30 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
| 31 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 31 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
| 32 #include "ppapi/shared_impl/api_id.h" | 32 #include "ppapi/shared_impl/api_id.h" |
| 33 #include "ppapi/shared_impl/audio_config_impl.h" | 33 #include "ppapi/shared_impl/audio_config_impl.h" |
| 34 #include "ppapi/shared_impl/font_impl.h" | 34 #include "ppapi/shared_impl/font_impl.h" |
| 35 #include "ppapi/shared_impl/function_group_base.h" | 35 #include "ppapi/shared_impl/function_group_base.h" |
| 36 #include "ppapi/shared_impl/host_resource.h" | 36 #include "ppapi/shared_impl/host_resource.h" |
| 37 #include "ppapi/shared_impl/input_event_impl.h" | 37 #include "ppapi/shared_impl/input_event_impl.h" |
| 38 #include "ppapi/shared_impl/url_request_info_impl.h" | 38 #include "ppapi/shared_impl/url_request_info_impl.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 PP_Instance instance, | 145 PP_Instance instance, |
| 146 const PP_Flash_Menu* menu_data) { | 146 const PP_Flash_Menu* menu_data) { |
| 147 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); | 147 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); |
| 148 } | 148 } |
| 149 | 149 |
| 150 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( | 150 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( |
| 151 PP_Instance instance) { | 151 PP_Instance instance) { |
| 152 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); | 152 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); |
| 153 } | 153 } |
| 154 | 154 |
| 155 PP_Resource ResourceCreationProxy::CreateFlashTCPSocket( | |
| 156 PP_Instance instance) { | |
| 157 return PPB_Flash_TCPSocket_Proxy::CreateProxyResource(instance); | |
| 158 } | |
| 159 | |
| 160 PP_Resource ResourceCreationProxy::CreateFlashUDPSocket( | |
| 161 PP_Instance instance) { | |
| 162 return PPB_Flash_UDPSocket_Proxy::CreateProxyResource(instance); | |
| 163 } | |
| 164 | |
| 165 PP_Resource ResourceCreationProxy::CreateFontObject( | 155 PP_Resource ResourceCreationProxy::CreateFontObject( |
| 166 PP_Instance instance, | 156 PP_Instance instance, |
| 167 const PP_FontDescription_Dev* description) { | 157 const PP_FontDescription_Dev* description) { |
| 168 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) | 158 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) |
| 169 return 0; | 159 return 0; |
| 170 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> | 160 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> |
| 171 GetReference(); | 161 GetReference(); |
| 172 } | 162 } |
| 173 | 163 |
| 174 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, | 164 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 274 } |
| 285 | 275 |
| 286 PP_Resource ResourceCreationProxy::CreateSurface3D( | 276 PP_Resource ResourceCreationProxy::CreateSurface3D( |
| 287 PP_Instance instance, | 277 PP_Instance instance, |
| 288 PP_Config3D_Dev config, | 278 PP_Config3D_Dev config, |
| 289 const int32_t* attrib_list) { | 279 const int32_t* attrib_list) { |
| 290 return PPB_Surface3D_Proxy::CreateProxyResource(instance, config, | 280 return PPB_Surface3D_Proxy::CreateProxyResource(instance, config, |
| 291 attrib_list); | 281 attrib_list); |
| 292 } | 282 } |
| 293 | 283 |
| 284 |
| 285 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( |
| 286 PP_Instance instance) { |
| 287 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); |
| 288 } |
| 289 |
| 294 PP_Resource ResourceCreationProxy::CreateTransport(PP_Instance instance, | 290 PP_Resource ResourceCreationProxy::CreateTransport(PP_Instance instance, |
| 295 const char* name, | 291 const char* name, |
| 296 PP_TransportType type) { | 292 PP_TransportType type) { |
| 297 NOTIMPLEMENTED(); // Not proxied yet. | 293 NOTIMPLEMENTED(); // Not proxied yet. |
| 298 return 0; | 294 return 0; |
| 299 } | 295 } |
| 300 | 296 |
| 297 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( |
| 298 PP_Instance instance) { |
| 299 return PPB_UDPSocket_Private_Proxy::CreateProxyResource(instance); |
| 300 } |
| 301 |
| 301 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { | 302 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { |
| 302 return PPB_URLLoader_Proxy::CreateProxyResource(instance); | 303 return PPB_URLLoader_Proxy::CreateProxyResource(instance); |
| 303 } | 304 } |
| 304 | 305 |
| 305 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( | 306 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( |
| 306 PP_Instance instance, | 307 PP_Instance instance, |
| 307 const PPB_URLRequestInfo_Data& data) { | 308 const PPB_URLRequestInfo_Data& data) { |
| 308 return (new URLRequestInfoImpl( | 309 return (new URLRequestInfoImpl( |
| 309 HostResource::MakeInstanceOnly(instance), data))->GetReference(); | 310 HostResource::MakeInstanceOnly(instance), data))->GetReference(); |
| 310 } | 311 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); | 417 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); |
| 417 #else | 418 #else |
| 418 *result_image_handle = ImageData::HandleFromInt(handle); | 419 *result_image_handle = ImageData::HandleFromInt(handle); |
| 419 #endif | 420 #endif |
| 420 } | 421 } |
| 421 } | 422 } |
| 422 } | 423 } |
| 423 | 424 |
| 424 } // namespace proxy | 425 } // namespace proxy |
| 425 } // namespace ppapi | 426 } // namespace ppapi |
| OLD | NEW |