| 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_input_proxy.h" | 13 #include "ppapi/proxy/ppb_audio_input_proxy.h" |
| 14 #include "ppapi/proxy/ppb_audio_proxy.h" | 14 #include "ppapi/proxy/ppb_audio_proxy.h" |
| 15 #include "ppapi/proxy/ppb_buffer_proxy.h" | 15 #include "ppapi/proxy/ppb_buffer_proxy.h" |
| 16 #include "ppapi/proxy/ppb_broker_proxy.h" | 16 #include "ppapi/proxy/ppb_broker_proxy.h" |
| 17 #include "ppapi/proxy/ppb_context_3d_proxy.h" | |
| 18 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
| 19 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 18 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
| 20 #include "ppapi/proxy/ppb_file_system_proxy.h" | 19 #include "ppapi/proxy/ppb_file_system_proxy.h" |
| 21 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 20 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
| 22 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" | 21 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
| 23 #include "ppapi/proxy/ppb_font_proxy.h" | 22 #include "ppapi/proxy/ppb_font_proxy.h" |
| 24 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 23 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
| 25 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 24 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
| 26 #include "ppapi/proxy/ppb_image_data_proxy.h" | 25 #include "ppapi/proxy/ppb_image_data_proxy.h" |
| 27 #include "ppapi/proxy/ppb_surface_3d_proxy.h" | |
| 28 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 26 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
| 29 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" | 27 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" |
| 30 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 28 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
| 31 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 29 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
| 32 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 30 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
| 33 #include "ppapi/shared_impl/api_id.h" | 31 #include "ppapi/shared_impl/api_id.h" |
| 34 #include "ppapi/shared_impl/audio_config_impl.h" | 32 #include "ppapi/shared_impl/audio_config_impl.h" |
| 35 #include "ppapi/shared_impl/font_impl.h" | 33 #include "ppapi/shared_impl/font_impl.h" |
| 36 #include "ppapi/shared_impl/function_group_base.h" | 34 #include "ppapi/shared_impl/function_group_base.h" |
| 37 #include "ppapi/shared_impl/host_resource.h" | 35 #include "ppapi/shared_impl/host_resource.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 100 |
| 103 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { | 101 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { |
| 104 return PPB_Broker_Proxy::CreateProxyResource(instance); | 102 return PPB_Broker_Proxy::CreateProxyResource(instance); |
| 105 } | 103 } |
| 106 | 104 |
| 107 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, | 105 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, |
| 108 uint32_t size) { | 106 uint32_t size) { |
| 109 return PPB_Buffer_Proxy::CreateProxyResource(instance, size); | 107 return PPB_Buffer_Proxy::CreateProxyResource(instance, size); |
| 110 } | 108 } |
| 111 | 109 |
| 112 PP_Resource ResourceCreationProxy::CreateContext3D( | |
| 113 PP_Instance instance, | |
| 114 PP_Config3D_Dev config, | |
| 115 PP_Resource share_context, | |
| 116 const int32_t* attrib_list) { | |
| 117 return PPB_Context3D_Proxy::Create(instance, config, share_context, | |
| 118 attrib_list); | |
| 119 } | |
| 120 | |
| 121 PP_Resource ResourceCreationProxy::CreateContext3DRaw( | |
| 122 PP_Instance instance, | |
| 123 PP_Config3D_Dev config, | |
| 124 PP_Resource share_context, | |
| 125 const int32_t* attrib_list) { | |
| 126 // Not proxied. The raw creation function is used only in the implementation | |
| 127 // of the proxy on the host side. | |
| 128 return 0; | |
| 129 } | |
| 130 | |
| 131 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 110 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
| 132 PP_Resource directory_ref) { | 111 PP_Resource directory_ref) { |
| 133 NOTIMPLEMENTED(); // Not proxied yet. | 112 NOTIMPLEMENTED(); // Not proxied yet. |
| 134 return 0; | 113 return 0; |
| 135 } | 114 } |
| 136 | 115 |
| 137 PP_Resource ResourceCreationProxy::CreateFileChooser( | 116 PP_Resource ResourceCreationProxy::CreateFileChooser( |
| 138 PP_Instance instance, | 117 PP_Instance instance, |
| 139 PP_FileChooserMode_Dev mode, | 118 PP_FileChooserMode_Dev mode, |
| 140 const char* accept_mime_types) { | 119 const char* accept_mime_types) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 // of the proxy on the host side. | 262 // of the proxy on the host side. |
| 284 return 0; | 263 return 0; |
| 285 } | 264 } |
| 286 | 265 |
| 287 PP_Resource ResourceCreationProxy::CreateScrollbar(PP_Instance instance, | 266 PP_Resource ResourceCreationProxy::CreateScrollbar(PP_Instance instance, |
| 288 PP_Bool vertical) { | 267 PP_Bool vertical) { |
| 289 NOTIMPLEMENTED(); // Not proxied yet. | 268 NOTIMPLEMENTED(); // Not proxied yet. |
| 290 return 0; | 269 return 0; |
| 291 } | 270 } |
| 292 | 271 |
| 293 PP_Resource ResourceCreationProxy::CreateSurface3D( | |
| 294 PP_Instance instance, | |
| 295 PP_Config3D_Dev config, | |
| 296 const int32_t* attrib_list) { | |
| 297 return PPB_Surface3D_Proxy::CreateProxyResource(instance, config, | |
| 298 attrib_list); | |
| 299 } | |
| 300 | |
| 301 | |
| 302 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( | 272 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( |
| 303 PP_Instance instance) { | 273 PP_Instance instance) { |
| 304 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); | 274 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); |
| 305 } | 275 } |
| 306 | 276 |
| 307 PP_Resource ResourceCreationProxy::CreateTransport(PP_Instance instance, | 277 PP_Resource ResourceCreationProxy::CreateTransport(PP_Instance instance, |
| 308 const char* name, | 278 const char* name, |
| 309 PP_TransportType type) { | 279 PP_TransportType type) { |
| 310 NOTIMPLEMENTED(); // Not proxied yet. | 280 NOTIMPLEMENTED(); // Not proxied yet. |
| 311 return 0; | 281 return 0; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); | 409 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); |
| 440 #else | 410 #else |
| 441 *result_image_handle = ImageData::HandleFromInt(handle); | 411 *result_image_handle = ImageData::HandleFromInt(handle); |
| 442 #endif | 412 #endif |
| 443 } | 413 } |
| 444 } | 414 } |
| 445 } | 415 } |
| 446 | 416 |
| 447 } // namespace proxy | 417 } // namespace proxy |
| 448 } // namespace ppapi | 418 } // namespace ppapi |
| OLD | NEW |