| 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 14 matching lines...) Expand all Loading... |
| 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_image_data_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_image_data_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_capture_impl.h" |
| 33 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 34 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 35 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" |
| 35 | 36 |
| 36 using ppapi::InputEventData; | 37 using ppapi::InputEventData; |
| 37 using ppapi::InputEventImpl; | 38 using ppapi::InputEventImpl; |
| 38 using ppapi::StringVar; | 39 using ppapi::StringVar; |
| 39 | 40 |
| 40 namespace webkit { | 41 namespace webkit { |
| 41 namespace ppapi { | 42 namespace ppapi { |
| 42 | 43 |
| 43 ResourceCreationImpl::ResourceCreationImpl(PluginInstance* instance) { | 44 ResourceCreationImpl::ResourceCreationImpl(PluginInstance* instance) { |
| 44 } | 45 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 PP_Resource context3d_id, | 287 PP_Resource context3d_id, |
| 287 PP_VideoDecoder_Profile profile) { | 288 PP_VideoDecoder_Profile profile) { |
| 288 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, profile); | 289 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, profile); |
| 289 } | 290 } |
| 290 | 291 |
| 291 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, | 292 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, |
| 292 PP_VideoLayerMode_Dev mode) { | 293 PP_VideoLayerMode_Dev mode) { |
| 293 return PPB_VideoLayer_Impl::Create(instance, mode); | 294 return PPB_VideoLayer_Impl::Create(instance, mode); |
| 294 } | 295 } |
| 295 | 296 |
| 297 PP_Resource ResourceCreationImpl::CreateWebSocket(PP_Instance instance) { |
| 298 return PPB_WebSocket_Impl::Create(instance); |
| 299 } |
| 300 |
| 296 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( | 301 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( |
| 297 PP_Instance instance, | 302 PP_Instance instance, |
| 298 PP_TimeTicks time_stamp, | 303 PP_TimeTicks time_stamp, |
| 299 uint32_t modifiers, | 304 uint32_t modifiers, |
| 300 const PP_FloatPoint* wheel_delta, | 305 const PP_FloatPoint* wheel_delta, |
| 301 const PP_FloatPoint* wheel_ticks, | 306 const PP_FloatPoint* wheel_ticks, |
| 302 PP_Bool scroll_by_page) { | 307 PP_Bool scroll_by_page) { |
| 303 InputEventData data; | 308 InputEventData data; |
| 304 data.event_type = PP_INPUTEVENT_TYPE_WHEEL; | 309 data.event_type = PP_INPUTEVENT_TYPE_WHEEL; |
| 305 data.event_time_stamp = time_stamp; | 310 data.event_time_stamp = time_stamp; |
| 306 data.event_modifiers = modifiers; | 311 data.event_modifiers = modifiers; |
| 307 data.wheel_delta = *wheel_delta; | 312 data.wheel_delta = *wheel_delta; |
| 308 data.wheel_ticks = *wheel_ticks; | 313 data.wheel_ticks = *wheel_ticks; |
| 309 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 314 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 310 | 315 |
| 311 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 316 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
| 312 instance, data))->GetReference(); | 317 instance, data))->GetReference(); |
| 313 } | 318 } |
| 314 | 319 |
| 315 } // namespace ppapi | 320 } // namespace ppapi |
| 316 } // namespace webkit | 321 } // namespace webkit |
| OLD | NEW |