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

Side by Side Diff: webkit/plugins/ppapi/resource_creation_impl.cc

Issue 8804006: Reland 8688002: PPB_TCPSocket_Private/PPB_UDPSocket_Private are exposed to Browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix destruction issue Created 9 years 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_udp_socket_private_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/plugins/ppapi/resource_creation_impl.h" 5 #include "webkit/plugins/ppapi/resource_creation_impl.h"
6 6
7 #include "ppapi/c/pp_size.h" 7 #include "ppapi/c/pp_size.h"
8 #include "ppapi/shared_impl/audio_config_impl.h" 8 #include "ppapi/shared_impl/audio_config_impl.h"
9 #include "ppapi/shared_impl/input_event_impl.h" 9 #include "ppapi/shared_impl/input_event_impl.h"
10 #include "ppapi/shared_impl/var.h" 10 #include "ppapi/shared_impl/var.h"
11 #include "webkit/plugins/ppapi/common.h" 11 #include "webkit/plugins/ppapi/common.h"
12 #include "webkit/plugins/ppapi/ppb_audio_impl.h" 12 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
13 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" 13 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h"
14 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 14 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" 15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" 16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
17 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" 17 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h"
18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" 19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h"
21 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" 21 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
22 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" 22 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h"
23 #include "webkit/plugins/ppapi/ppb_font_impl.h" 23 #include "webkit/plugins/ppapi/ppb_font_impl.h"
24 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" 24 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
25 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 25 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
26 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 26 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
27 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" 27 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h"
28 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h"
28 #include "webkit/plugins/ppapi/ppb_transport_impl.h" 29 #include "webkit/plugins/ppapi/ppb_transport_impl.h"
30 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h"
29 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" 31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
30 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 32 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
31 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" 33 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h"
32 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" 34 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
33 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" 35 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
34 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" 36 #include "webkit/plugins/ppapi/ppb_websocket_impl.h"
35 37
36 using ppapi::InputEventData; 38 using ppapi::InputEventData;
37 using ppapi::InputEventImpl; 39 using ppapi::InputEventImpl;
38 using ppapi::StringVar; 40 using ppapi::StringVar;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return (new InputEventImpl(InputEventImpl::InitAsImpl(), 228 return (new InputEventImpl(InputEventImpl::InitAsImpl(),
227 instance, data))->GetReference(); 229 instance, data))->GetReference();
228 } 230 }
229 231
230 PP_Resource ResourceCreationImpl::CreateScrollbar(PP_Instance instance, 232 PP_Resource ResourceCreationImpl::CreateScrollbar(PP_Instance instance,
231 PP_Bool vertical) { 233 PP_Bool vertical) {
232 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical)); 234 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical));
233 } 235 }
234 236
235 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { 237 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) {
236 // Creating TCP socket resource at the renderer side is not supported. 238 return PPB_TCPSocket_Private_Impl::CreateResource(instance);
237 return 0;
238 } 239 }
239 240
240 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, 241 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance,
241 const char* name, 242 const char* name,
242 PP_TransportType type) { 243 PP_TransportType type) {
243 #if defined(ENABLE_P2P_APIS) 244 #if defined(ENABLE_P2P_APIS)
244 return PPB_Transport_Impl::Create(instance, name, type); 245 return PPB_Transport_Impl::Create(instance, name, type);
245 #endif 246 #endif
246 } 247 }
247 248
248 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { 249 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) {
249 // Creating UDP socket resource at the renderer side is not supported. 250 return PPB_UDPSocket_Private_Impl::CreateResource(instance);
250 return 0;
251 } 251 }
252 252
253 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { 253 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) {
254 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); 254 return (new PPB_URLLoader_Impl(instance, false))->GetReference();
255 } 255 }
256 256
257 PP_Resource ResourceCreationImpl::CreateURLRequestInfo( 257 PP_Resource ResourceCreationImpl::CreateURLRequestInfo(
258 PP_Instance instance, 258 PP_Instance instance,
259 const ::ppapi::PPB_URLRequestInfo_Data& data) { 259 const ::ppapi::PPB_URLRequestInfo_Data& data) {
260 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference(); 260 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 data.wheel_delta = *wheel_delta; 298 data.wheel_delta = *wheel_delta;
299 data.wheel_ticks = *wheel_ticks; 299 data.wheel_ticks = *wheel_ticks;
300 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); 300 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
301 301
302 return (new InputEventImpl(InputEventImpl::InitAsImpl(), 302 return (new InputEventImpl(InputEventImpl::InitAsImpl(),
303 instance, data))->GetReference(); 303 instance, data))->GetReference();
304 } 304 }
305 305
306 } // namespace ppapi 306 } // namespace ppapi
307 } // namespace webkit 307 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_udp_socket_private_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698