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 "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_context_3d_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" |
17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
18 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" |
19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
23 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
24 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
25 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
27 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 27 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
28 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
29 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" |
| 30 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
30 #include "webkit/plugins/ppapi/ppb_transport_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_transport_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" |
31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
32 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
33 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | 35 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
34 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 36 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
35 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 37 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
36 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" | 38 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" |
37 | 39 |
38 using ppapi::InputEventData; | 40 using ppapi::InputEventData; |
39 using ppapi::InputEventImpl; | 41 using ppapi::InputEventImpl; |
40 using ppapi::StringVar; | 42 using ppapi::StringVar; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 256 |
255 PP_Resource ResourceCreationImpl::CreateSurface3D( | 257 PP_Resource ResourceCreationImpl::CreateSurface3D( |
256 PP_Instance instance, | 258 PP_Instance instance, |
257 PP_Config3D_Dev config, | 259 PP_Config3D_Dev config, |
258 const int32_t* attrib_list) { | 260 const int32_t* attrib_list) { |
259 return PPB_Surface3D_Impl::Create(instance, config, attrib_list); | 261 return PPB_Surface3D_Impl::Create(instance, config, attrib_list); |
260 } | 262 } |
261 | 263 |
262 | 264 |
263 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { | 265 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { |
264 // Creating TCP socket resource at the renderer side is not supported. | 266 return PPB_TCPSocket_Private_Impl::CreateResource(instance); |
265 return 0; | |
266 } | 267 } |
267 | 268 |
268 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, | 269 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, |
269 const char* name, | 270 const char* name, |
270 PP_TransportType type) { | 271 PP_TransportType type) { |
271 #if defined(ENABLE_P2P_APIS) | 272 #if defined(ENABLE_P2P_APIS) |
272 return PPB_Transport_Impl::Create(instance, name, type); | 273 return PPB_Transport_Impl::Create(instance, name, type); |
273 #endif | 274 #endif |
274 } | 275 } |
275 | 276 |
276 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { | 277 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { |
277 // Creating UDP socket resource at the renderer side is not supported. | 278 return PPB_UDPSocket_Private_Impl::CreateResource(instance); |
278 return 0; | |
279 } | 279 } |
280 | 280 |
281 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { | 281 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { |
282 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); | 282 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); |
283 } | 283 } |
284 | 284 |
285 PP_Resource ResourceCreationImpl::CreateURLRequestInfo( | 285 PP_Resource ResourceCreationImpl::CreateURLRequestInfo( |
286 PP_Instance instance, | 286 PP_Instance instance, |
287 const ::ppapi::PPB_URLRequestInfo_Data& data) { | 287 const ::ppapi::PPB_URLRequestInfo_Data& data) { |
288 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference(); | 288 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 data.wheel_delta = *wheel_delta; | 326 data.wheel_delta = *wheel_delta; |
327 data.wheel_ticks = *wheel_ticks; | 327 data.wheel_ticks = *wheel_ticks; |
328 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 328 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
329 | 329 |
330 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 330 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
331 instance, data))->GetReference(); | 331 instance, data))->GetReference(); |
332 } | 332 } |
333 | 333 |
334 } // namespace ppapi | 334 } // namespace ppapi |
335 } // namespace webkit | 335 } // namespace webkit |
OLD | NEW |