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 11 matching lines...) Expand all Loading... |
22 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
23 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
24 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" |
25 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
26 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_network_monitor_private_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_server_socket_private_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" |
29 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
30 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" | 30 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" |
31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
32 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | |
33 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 32 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
34 #include "webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h" |
35 #include "webkit/plugins/ppapi/resource_helper.h" | 34 #include "webkit/plugins/ppapi/resource_helper.h" |
36 | 35 |
37 using ppapi::InputEventData; | 36 using ppapi::InputEventData; |
38 using ppapi::PPB_InputEvent_Shared; | 37 using ppapi::PPB_InputEvent_Shared; |
39 using ppapi::PPB_ResourceArray_Shared; | 38 using ppapi::PPB_ResourceArray_Shared; |
40 using ppapi::StringVar; | 39 using ppapi::StringVar; |
41 | 40 |
42 namespace webkit { | 41 namespace webkit { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 264 |
266 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { | 265 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { |
267 return PPB_UDPSocket_Private_Impl::CreateResource(instance); | 266 return PPB_UDPSocket_Private_Impl::CreateResource(instance); |
268 } | 267 } |
269 | 268 |
270 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { | 269 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { |
271 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); | 270 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); |
272 } | 271 } |
273 | 272 |
274 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) { | 273 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) { |
275 scoped_refptr<PPB_VideoCapture_Impl> video_capture = | 274 return 0; // VideoCapture is not supported in process now. |
276 new PPB_VideoCapture_Impl(instance); | |
277 if (!video_capture->Init()) | |
278 return 0; | |
279 return video_capture->GetReference(); | |
280 } | 275 } |
281 | 276 |
282 PP_Resource ResourceCreationImpl::CreateVideoDecoder( | 277 PP_Resource ResourceCreationImpl::CreateVideoDecoder( |
283 PP_Instance instance, | 278 PP_Instance instance, |
284 PP_Resource graphics3d_id, | 279 PP_Resource graphics3d_id, |
285 PP_VideoDecoder_Profile profile) { | 280 PP_VideoDecoder_Profile profile) { |
286 return PPB_VideoDecoder_Impl::Create(instance, graphics3d_id, profile); | 281 return PPB_VideoDecoder_Impl::Create(instance, graphics3d_id, profile); |
287 } | 282 } |
288 | 283 |
289 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( | 284 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( |
290 PP_Instance instance, | 285 PP_Instance instance, |
291 PP_TimeTicks time_stamp, | 286 PP_TimeTicks time_stamp, |
292 uint32_t modifiers, | 287 uint32_t modifiers, |
293 const PP_FloatPoint* wheel_delta, | 288 const PP_FloatPoint* wheel_delta, |
294 const PP_FloatPoint* wheel_ticks, | 289 const PP_FloatPoint* wheel_ticks, |
295 PP_Bool scroll_by_page) { | 290 PP_Bool scroll_by_page) { |
296 return PPB_InputEvent_Shared::CreateWheelInputEvent( | 291 return PPB_InputEvent_Shared::CreateWheelInputEvent( |
297 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 292 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
298 wheel_delta, wheel_ticks, scroll_by_page); | 293 wheel_delta, wheel_ticks, scroll_by_page); |
299 } | 294 } |
300 | 295 |
301 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 296 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
302 PP_Instance instance) { | 297 PP_Instance instance) { |
303 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 298 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
304 } | 299 } |
305 | 300 |
306 } // namespace ppapi | 301 } // namespace ppapi |
307 } // namespace webkit | 302 } // namespace webkit |
OLD | NEW |