| 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_browser_font_trusted_shared.h" | 9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" |
| 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 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_host_resolver_private_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_host_resolver_private_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_network_monitor_private_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_network_monitor_private_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_server_socket_private_impl.h" |
| 31 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" | 32 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" |
| 33 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
| 34 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | |
| 35 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 36 #include "webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h" | 35 #include "webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h" |
| 37 #include "webkit/plugins/ppapi/resource_helper.h" | 36 #include "webkit/plugins/ppapi/resource_helper.h" |
| 38 | 37 |
| 39 using ppapi::InputEventData; | 38 using ppapi::InputEventData; |
| 40 using ppapi::PPB_InputEvent_Shared; | 39 using ppapi::PPB_InputEvent_Shared; |
| 41 using ppapi::PPB_ResourceArray_Shared; | 40 using ppapi::PPB_ResourceArray_Shared; |
| 42 using ppapi::StringVar; | 41 using ppapi::StringVar; |
| 43 | 42 |
| 44 namespace webkit { | 43 namespace webkit { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 275 |
| 277 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { | 276 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { |
| 278 return PPB_UDPSocket_Private_Impl::CreateResource(instance); | 277 return PPB_UDPSocket_Private_Impl::CreateResource(instance); |
| 279 } | 278 } |
| 280 | 279 |
| 281 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { | 280 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { |
| 282 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); | 281 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); |
| 283 } | 282 } |
| 284 | 283 |
| 285 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) { | 284 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) { |
| 286 scoped_refptr<PPB_VideoCapture_Impl> video_capture = | 285 return 0; // VideoCapture is not supported in process now. |
| 287 new PPB_VideoCapture_Impl(instance); | |
| 288 if (!video_capture->Init()) | |
| 289 return 0; | |
| 290 return video_capture->GetReference(); | |
| 291 } | 286 } |
| 292 | 287 |
| 293 PP_Resource ResourceCreationImpl::CreateVideoDecoder( | 288 PP_Resource ResourceCreationImpl::CreateVideoDecoder( |
| 294 PP_Instance instance, | 289 PP_Instance instance, |
| 295 PP_Resource graphics3d_id, | 290 PP_Resource graphics3d_id, |
| 296 PP_VideoDecoder_Profile profile) { | 291 PP_VideoDecoder_Profile profile) { |
| 297 return PPB_VideoDecoder_Impl::Create(instance, graphics3d_id, profile); | 292 return PPB_VideoDecoder_Impl::Create(instance, graphics3d_id, profile); |
| 298 } | 293 } |
| 299 | 294 |
| 300 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( | 295 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( |
| 301 PP_Instance instance, | 296 PP_Instance instance, |
| 302 PP_TimeTicks time_stamp, | 297 PP_TimeTicks time_stamp, |
| 303 uint32_t modifiers, | 298 uint32_t modifiers, |
| 304 const PP_FloatPoint* wheel_delta, | 299 const PP_FloatPoint* wheel_delta, |
| 305 const PP_FloatPoint* wheel_ticks, | 300 const PP_FloatPoint* wheel_ticks, |
| 306 PP_Bool scroll_by_page) { | 301 PP_Bool scroll_by_page) { |
| 307 return PPB_InputEvent_Shared::CreateWheelInputEvent( | 302 return PPB_InputEvent_Shared::CreateWheelInputEvent( |
| 308 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 303 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
| 309 wheel_delta, wheel_ticks, scroll_by_page); | 304 wheel_delta, wheel_ticks, scroll_by_page); |
| 310 } | 305 } |
| 311 | 306 |
| 312 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 307 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
| 313 PP_Instance instance) { | 308 PP_Instance instance) { |
| 314 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 309 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
| 315 } | 310 } |
| 316 | 311 |
| 317 } // namespace ppapi | 312 } // namespace ppapi |
| 318 } // namespace webkit | 313 } // namespace webkit |
| OLD | NEW |