Chromium Code Reviews| 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 "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/ppb_audio_config_shared.h" | 8 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 9 #include "ppapi/shared_impl/private/ppb_font_shared.h" | 9 #include "ppapi/shared_impl/private/ppb_font_shared.h" |
| 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | 11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
| 12 #include "ppapi/shared_impl/var.h" | 12 #include "ppapi/shared_impl/var.h" |
| 13 #include "webkit/plugins/ppapi/common.h" | 13 #include "webkit/plugins/ppapi/common.h" |
| 14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" | 14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" |
| 15 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" |
| 16 #include "webkit/plugins/ppapi/ppb_broker_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 17 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
| 18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 19 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" |
| 20 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
| 21 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 22 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 24 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" |
| 25 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| 26 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 27 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 27 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 28 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 29 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 30 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" | |
| 30 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
| 31 #include "webkit/plugins/ppapi/ppb_transport_impl.h" | 32 #include "webkit/plugins/ppapi/ppb_transport_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" |
| 33 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
| 34 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" | 35 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
| 35 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | 36 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
| 36 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 37 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 37 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 38 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 38 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" | 39 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" |
| 39 #include "webkit/plugins/ppapi/resource_helper.h" | 40 #include "webkit/plugins/ppapi/resource_helper.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 | 250 |
| 250 PP_Resource ResourceCreationImpl::CreateResourceArray( | 251 PP_Resource ResourceCreationImpl::CreateResourceArray( |
| 251 PP_Instance instance, | 252 PP_Instance instance, |
| 252 const PP_Resource elements[], | 253 const PP_Resource elements[], |
| 253 uint32_t size) { | 254 uint32_t size) { |
| 254 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( | 255 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( |
| 255 PPB_ResourceArray_Shared::InitAsImpl(), instance, elements, size); | 256 PPB_ResourceArray_Shared::InitAsImpl(), instance, elements, size); |
| 256 return object->GetReference(); | 257 return object->GetReference(); |
| 257 } | 258 } |
| 258 | 259 |
| 260 int32_t ResourceCreationImpl::CreateTCPServerSocketPrivate( | |
|
brettw
2012/02/09 00:13:48
When you make creation synchronous, you should ret
ygorshenin1
2012/02/09 15:00:10
Done.
| |
| 261 PP_Instance instance, | |
| 262 PP_Resource* tcp_server_socket, | |
| 263 PP_CompletionCallback callback) { | |
| 264 return PPB_TCPServerSocket_Private_Impl::CreateResource(instance, | |
| 265 tcp_server_socket, | |
| 266 callback); | |
| 267 } | |
| 268 | |
| 259 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { | 269 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { |
| 260 return PPB_TCPSocket_Private_Impl::CreateResource(instance); | 270 return PPB_TCPSocket_Private_Impl::CreateResource(instance); |
| 261 } | 271 } |
| 262 | 272 |
| 263 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, | 273 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, |
| 264 const char* name, | 274 const char* name, |
| 265 PP_TransportType type) { | 275 PP_TransportType type) { |
| 266 #if defined(ENABLE_P2P_APIS) | 276 #if defined(ENABLE_P2P_APIS) |
| 267 return PPB_Transport_Impl::Create(instance, name, type); | 277 return PPB_Transport_Impl::Create(instance, name, type); |
| 268 #else | 278 #else |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 data.wheel_delta = *wheel_delta; | 332 data.wheel_delta = *wheel_delta; |
| 323 data.wheel_ticks = *wheel_ticks; | 333 data.wheel_ticks = *wheel_ticks; |
| 324 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 334 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 325 | 335 |
| 326 return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), | 336 return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), |
| 327 instance, data))->GetReference(); | 337 instance, data))->GetReference(); |
| 328 } | 338 } |
| 329 | 339 |
| 330 } // namespace ppapi | 340 } // namespace ppapi |
| 331 } // namespace webkit | 341 } // namespace webkit |
| OLD | NEW |