Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7745005: Initial work for UDP Pepper API (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: A few more changes after self-review Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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" 17 #include "ppapi/proxy/ppb_context_3d_proxy.h"
18 #include "ppapi/proxy/ppb_file_chooser_proxy.h" 18 #include "ppapi/proxy/ppb_file_chooser_proxy.h"
19 #include "ppapi/proxy/ppb_file_ref_proxy.h" 19 #include "ppapi/proxy/ppb_file_ref_proxy.h"
20 #include "ppapi/proxy/ppb_file_system_proxy.h" 20 #include "ppapi/proxy/ppb_file_system_proxy.h"
21 #include "ppapi/proxy/ppb_flash_menu_proxy.h" 21 #include "ppapi/proxy/ppb_flash_menu_proxy.h"
22 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" 22 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h"
23 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" 23 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h"
24 #include "ppapi/proxy/ppb_flash_udp_socket_proxy.h"
24 #include "ppapi/proxy/ppb_font_proxy.h" 25 #include "ppapi/proxy/ppb_font_proxy.h"
25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" 26 #include "ppapi/proxy/ppb_graphics_2d_proxy.h"
26 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 27 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
27 #include "ppapi/proxy/ppb_image_data_proxy.h" 28 #include "ppapi/proxy/ppb_image_data_proxy.h"
28 #include "ppapi/proxy/ppb_surface_3d_proxy.h" 29 #include "ppapi/proxy/ppb_surface_3d_proxy.h"
29 #include "ppapi/proxy/ppb_url_loader_proxy.h" 30 #include "ppapi/proxy/ppb_url_loader_proxy.h"
30 #include "ppapi/proxy/ppb_video_capture_proxy.h" 31 #include "ppapi/proxy/ppb_video_capture_proxy.h"
31 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 32 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
32 #include "ppapi/shared_impl/audio_config_impl.h" 33 #include "ppapi/shared_impl/audio_config_impl.h"
33 #include "ppapi/shared_impl/font_impl.h" 34 #include "ppapi/shared_impl/font_impl.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( 145 PP_Resource ResourceCreationProxy::CreateFlashNetConnector(
145 PP_Instance instance) { 146 PP_Instance instance) {
146 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); 147 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance);
147 } 148 }
148 149
149 PP_Resource ResourceCreationProxy::CreateFlashTCPSocket( 150 PP_Resource ResourceCreationProxy::CreateFlashTCPSocket(
150 PP_Instance instance) { 151 PP_Instance instance) {
151 return PPB_Flash_TCPSocket_Proxy::CreateProxyResource(instance); 152 return PPB_Flash_TCPSocket_Proxy::CreateProxyResource(instance);
152 } 153 }
153 154
155 PP_Resource ResourceCreationProxy::CreateFlashUDPSocket(
156 PP_Instance instance,
157 int32_t family) {
158 return PPB_Flash_UDPSocket_Proxy::CreateProxyResource(instance, family);
159 }
160
154 PP_Resource ResourceCreationProxy::CreateFontObject( 161 PP_Resource ResourceCreationProxy::CreateFontObject(
155 PP_Instance instance, 162 PP_Instance instance,
156 const PP_FontDescription_Dev* description) { 163 const PP_FontDescription_Dev* description) {
157 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) 164 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description))
158 return 0; 165 return 0;
159 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> 166 return (new Font(HostResource::MakeInstanceOnly(instance), *description))->
160 GetReference(); 167 GetReference();
161 } 168 }
162 169
163 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, 170 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); 412 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false);
406 #else 413 #else
407 *result_image_handle = ImageData::HandleFromInt(handle); 414 *result_image_handle = ImageData::HandleFromInt(handle);
408 #endif 415 #endif
409 } 416 }
410 } 417 }
411 } 418 }
412 419
413 } // namespace proxy 420 } // namespace proxy
414 } // namespace ppapi 421 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698