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" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 scoped_refptr<PPB_VideoCapture_Impl> video_capture = | 267 scoped_refptr<PPB_VideoCapture_Impl> video_capture = |
268 new PPB_VideoCapture_Impl(instance); | 268 new PPB_VideoCapture_Impl(instance); |
269 if (!video_capture->Init()) | 269 if (!video_capture->Init()) |
270 return 0; | 270 return 0; |
271 return video_capture->GetReference(); | 271 return video_capture->GetReference(); |
272 } | 272 } |
273 | 273 |
274 PP_Resource ResourceCreationImpl::CreateVideoDecoder( | 274 PP_Resource ResourceCreationImpl::CreateVideoDecoder( |
275 PP_Instance instance, | 275 PP_Instance instance, |
276 PP_Resource context3d_id, | 276 PP_Resource context3d_id, |
277 const PP_VideoConfigElement* config) { | 277 PP_VideoDecoder_Profile profile) { |
278 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, config); | 278 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, profile); |
279 } | 279 } |
280 | 280 |
281 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, | 281 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, |
282 PP_VideoLayerMode_Dev mode) { | 282 PP_VideoLayerMode_Dev mode) { |
283 return PPB_VideoLayer_Impl::Create(instance, mode); | 283 return PPB_VideoLayer_Impl::Create(instance, mode); |
284 } | 284 } |
285 | 285 |
286 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( | 286 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( |
287 PP_Instance instance, | 287 PP_Instance instance, |
288 PP_TimeTicks time_stamp, | 288 PP_TimeTicks time_stamp, |
289 uint32_t modifiers, | 289 uint32_t modifiers, |
290 const PP_FloatPoint* wheel_delta, | 290 const PP_FloatPoint* wheel_delta, |
291 const PP_FloatPoint* wheel_ticks, | 291 const PP_FloatPoint* wheel_ticks, |
292 PP_Bool scroll_by_page) { | 292 PP_Bool scroll_by_page) { |
293 InputEventData data; | 293 InputEventData data; |
294 data.event_type = PP_INPUTEVENT_TYPE_WHEEL; | 294 data.event_type = PP_INPUTEVENT_TYPE_WHEEL; |
295 data.event_time_stamp = time_stamp; | 295 data.event_time_stamp = time_stamp; |
296 data.event_modifiers = modifiers; | 296 data.event_modifiers = modifiers; |
297 data.wheel_delta = *wheel_delta; | 297 data.wheel_delta = *wheel_delta; |
298 data.wheel_ticks = *wheel_ticks; | 298 data.wheel_ticks = *wheel_ticks; |
299 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 299 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
300 | 300 |
301 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 301 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
302 instance, data))->GetReference(); | 302 instance, data))->GetReference(); |
303 } | 303 } |
304 | 304 |
305 } // namespace ppapi | 305 } // namespace ppapi |
306 } // namespace webkit | 306 } // namespace webkit |
OLD | NEW |