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/proxy/interface_id.h" | 9 #include "ppapi/proxy/interface_id.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
11 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 11 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
12 #include "ppapi/proxy/plugin_resource_tracker.h" | 12 #include "ppapi/proxy/plugin_resource_tracker.h" |
13 #include "ppapi/proxy/ppapi_messages.h" | 13 #include "ppapi/proxy/ppapi_messages.h" |
14 #include "ppapi/proxy/ppb_audio_config_proxy.h" | 14 #include "ppapi/proxy/ppb_audio_config_proxy.h" |
15 #include "ppapi/proxy/ppb_audio_proxy.h" | 15 #include "ppapi/proxy/ppb_audio_proxy.h" |
16 #include "ppapi/proxy/ppb_buffer_proxy.h" | 16 #include "ppapi/proxy/ppb_buffer_proxy.h" |
17 #include "ppapi/proxy/ppb_broker_proxy.h" | 17 #include "ppapi/proxy/ppb_broker_proxy.h" |
18 #include "ppapi/proxy/ppb_context_3d_proxy.h" | 18 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
19 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 19 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
20 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 20 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
21 #include "ppapi/proxy/ppb_file_system_proxy.h" | 21 #include "ppapi/proxy/ppb_file_system_proxy.h" |
22 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 22 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
23 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" | 23 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
24 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" | 24 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" |
| 25 #include "ppapi/proxy/ppb_flash_udp_socket_proxy.h" |
25 #include "ppapi/proxy/ppb_font_proxy.h" | 26 #include "ppapi/proxy/ppb_font_proxy.h" |
26 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 27 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
27 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 28 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
28 #include "ppapi/proxy/ppb_image_data_proxy.h" | 29 #include "ppapi/proxy/ppb_image_data_proxy.h" |
29 #include "ppapi/proxy/ppb_input_event_proxy.h" | 30 #include "ppapi/proxy/ppb_input_event_proxy.h" |
30 #include "ppapi/proxy/ppb_surface_3d_proxy.h" | 31 #include "ppapi/proxy/ppb_surface_3d_proxy.h" |
31 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 32 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
32 #include "ppapi/proxy/ppb_url_request_info_proxy.h" | 33 #include "ppapi/proxy/ppb_url_request_info_proxy.h" |
33 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 34 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
34 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 35 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( | 146 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( |
146 PP_Instance instance) { | 147 PP_Instance instance) { |
147 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); | 148 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); |
148 } | 149 } |
149 | 150 |
150 PP_Resource ResourceCreationProxy::CreateFlashTCPSocket( | 151 PP_Resource ResourceCreationProxy::CreateFlashTCPSocket( |
151 PP_Instance instance) { | 152 PP_Instance instance) { |
152 return PPB_Flash_TCPSocket_Proxy::CreateProxyResource(instance); | 153 return PPB_Flash_TCPSocket_Proxy::CreateProxyResource(instance); |
153 } | 154 } |
154 | 155 |
| 156 PP_Resource ResourceCreationProxy::CreateFlashUDPSocket( |
| 157 PP_Instance instance, |
| 158 int32_t family) { |
| 159 return PPB_Flash_UDPSocket_Proxy::CreateProxyResource(instance, family); |
| 160 } |
| 161 |
155 PP_Resource ResourceCreationProxy::CreateFontObject( | 162 PP_Resource ResourceCreationProxy::CreateFontObject( |
156 PP_Instance instance, | 163 PP_Instance instance, |
157 const PP_FontDescription_Dev* description) { | 164 const PP_FontDescription_Dev* description) { |
158 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) | 165 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) |
159 return 0; | 166 return 0; |
160 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> | 167 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> |
161 GetReference(); | 168 GetReference(); |
162 } | 169 } |
163 | 170 |
164 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, | 171 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); | 405 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); |
399 #else | 406 #else |
400 *result_image_handle = ImageData::HandleFromInt(handle); | 407 *result_image_handle = ImageData::HandleFromInt(handle); |
401 #endif | 408 #endif |
402 } | 409 } |
403 } | 410 } |
404 } | 411 } |
405 | 412 |
406 } // namespace proxy | 413 } // namespace proxy |
407 } // namespace ppapi | 414 } // namespace ppapi |
OLD | NEW |