| 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/input_event_impl.h" | 8 #include "ppapi/shared_impl/input_event_impl.h" |
| 9 #include "ppapi/shared_impl/var.h" | 9 #include "ppapi/shared_impl/var.h" |
| 10 #include "webkit/plugins/ppapi/common.h" | 10 #include "webkit/plugins/ppapi/common.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 24 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_graphics_3d_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_input_event_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_input_event_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_surface_3d_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" |
| 29 #include "webkit/plugins/ppapi/ppb_transport_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_transport_impl.h" |
| 30 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 30 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
| 31 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 33 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 34 | 35 |
| 35 using ppapi::InputEventData; | 36 using ppapi::InputEventData; |
| 36 using ppapi::StringVar; | 37 using ppapi::StringVar; |
| 37 | 38 |
| 38 namespace webkit { | 39 namespace webkit { |
| 39 namespace ppapi { | 40 namespace ppapi { |
| 40 | 41 |
| 41 namespace { | 42 namespace { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 } | 278 } |
| 278 | 279 |
| 279 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { | 280 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { |
| 280 return ReturnResource(new PPB_URLLoader_Impl(instance_, false)); | 281 return ReturnResource(new PPB_URLLoader_Impl(instance_, false)); |
| 281 } | 282 } |
| 282 | 283 |
| 283 PP_Resource ResourceCreationImpl::CreateURLRequestInfo(PP_Instance instance) { | 284 PP_Resource ResourceCreationImpl::CreateURLRequestInfo(PP_Instance instance) { |
| 284 return ReturnResource(new PPB_URLRequestInfo_Impl(instance_)); | 285 return ReturnResource(new PPB_URLRequestInfo_Impl(instance_)); |
| 285 } | 286 } |
| 286 | 287 |
| 288 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) { |
| 289 scoped_refptr<PPB_VideoCapture_Impl> video_capture = |
| 290 new PPB_VideoCapture_Impl(instance_); |
| 291 if (!video_capture->Init()) |
| 292 return 0; |
| 293 return ReturnResource(video_capture); |
| 294 } |
| 295 |
| 287 PP_Resource ResourceCreationImpl::CreateVideoDecoder( | 296 PP_Resource ResourceCreationImpl::CreateVideoDecoder( |
| 288 PP_Instance instance, | 297 PP_Instance instance, |
| 289 PP_Resource context3d_id, | 298 PP_Resource context3d_id, |
| 290 const PP_VideoConfigElement* config) { | 299 const PP_VideoConfigElement* config) { |
| 291 return PPB_VideoDecoder_Impl::Create(instance_, context3d_id, config); | 300 return PPB_VideoDecoder_Impl::Create(instance_, context3d_id, config); |
| 292 } | 301 } |
| 293 | 302 |
| 294 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, | 303 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, |
| 295 PP_VideoLayerMode_Dev mode) { | 304 PP_VideoLayerMode_Dev mode) { |
| 296 return PPB_VideoLayer_Impl::Create(instance_, mode); | 305 return PPB_VideoLayer_Impl::Create(instance_, mode); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 309 data.event_modifiers = modifiers; | 318 data.event_modifiers = modifiers; |
| 310 data.wheel_delta = *wheel_delta; | 319 data.wheel_delta = *wheel_delta; |
| 311 data.wheel_ticks = *wheel_ticks; | 320 data.wheel_ticks = *wheel_ticks; |
| 312 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 321 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 313 | 322 |
| 314 return PPB_InputEvent_Impl::Create(instance_, data); | 323 return PPB_InputEvent_Impl::Create(instance_, data); |
| 315 } | 324 } |
| 316 | 325 |
| 317 } // namespace ppapi | 326 } // namespace ppapi |
| 318 } // namespace webkit | 327 } // namespace webkit |
| OLD | NEW |