OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/audio_input_resource.h" | 10 #include "ppapi/proxy/audio_input_resource.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" | 34 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" |
35 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" | 35 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" |
36 #include "ppapi/proxy/ppb_tcp_socket_proxy.h" | 36 #include "ppapi/proxy/ppb_tcp_socket_proxy.h" |
37 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 37 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
38 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 38 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
39 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 39 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
40 #include "ppapi/proxy/printing_resource.h" | 40 #include "ppapi/proxy/printing_resource.h" |
41 #include "ppapi/proxy/talk_resource.h" | 41 #include "ppapi/proxy/talk_resource.h" |
42 #include "ppapi/proxy/truetype_font_resource.h" | 42 #include "ppapi/proxy/truetype_font_resource.h" |
43 #include "ppapi/proxy/udp_socket_private_resource.h" | 43 #include "ppapi/proxy/udp_socket_private_resource.h" |
| 44 #include "ppapi/proxy/udp_socket_resource.h" |
44 #include "ppapi/proxy/url_loader_resource.h" | 45 #include "ppapi/proxy/url_loader_resource.h" |
45 #include "ppapi/proxy/url_request_info_resource.h" | 46 #include "ppapi/proxy/url_request_info_resource.h" |
46 #include "ppapi/proxy/url_response_info_resource.h" | 47 #include "ppapi/proxy/url_response_info_resource.h" |
47 #include "ppapi/proxy/video_capture_resource.h" | 48 #include "ppapi/proxy/video_capture_resource.h" |
48 #include "ppapi/proxy/video_destination_resource.h" | 49 #include "ppapi/proxy/video_destination_resource.h" |
49 #include "ppapi/proxy/video_source_resource.h" | 50 #include "ppapi/proxy/video_source_resource.h" |
50 #include "ppapi/proxy/websocket_resource.h" | 51 #include "ppapi/proxy/websocket_resource.h" |
51 #include "ppapi/shared_impl/api_id.h" | 52 #include "ppapi/shared_impl/api_id.h" |
52 #include "ppapi/shared_impl/host_resource.h" | 53 #include "ppapi/shared_impl/host_resource.h" |
53 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 54 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 PP_Resource ResourceCreationProxy::CreateTCPSocket( | 326 PP_Resource ResourceCreationProxy::CreateTCPSocket( |
326 PP_Instance instance) { | 327 PP_Instance instance) { |
327 return PPB_TCPSocket_Proxy::CreateProxyResource(instance); | 328 return PPB_TCPSocket_Proxy::CreateProxyResource(instance); |
328 } | 329 } |
329 | 330 |
330 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( | 331 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( |
331 PP_Instance instance) { | 332 PP_Instance instance) { |
332 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); | 333 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); |
333 } | 334 } |
334 | 335 |
| 336 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { |
| 337 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); |
| 338 } |
| 339 |
335 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( | 340 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( |
336 PP_Instance instance) { | 341 PP_Instance instance) { |
337 return (new UDPSocketPrivateResource( | 342 return (new UDPSocketPrivateResource( |
338 GetConnection(), instance))->GetReference(); | 343 GetConnection(), instance))->GetReference(); |
339 } | 344 } |
340 | 345 |
341 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { | 346 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { |
342 return (new WebSocketResource(GetConnection(), instance))->GetReference(); | 347 return (new WebSocketResource(GetConnection(), instance))->GetReference(); |
343 } | 348 } |
344 | 349 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 452 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
448 return false; | 453 return false; |
449 } | 454 } |
450 | 455 |
451 Connection ResourceCreationProxy::GetConnection() { | 456 Connection ResourceCreationProxy::GetConnection() { |
452 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 457 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
453 } | 458 } |
454 | 459 |
455 } // namespace proxy | 460 } // namespace proxy |
456 } // namespace ppapi | 461 } // namespace ppapi |
OLD | NEW |