| 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 "base/logging.h" |
| 7 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
| 8 #include "ppapi/shared_impl/audio_config_impl.h" | 9 #include "ppapi/shared_impl/audio_config_impl.h" |
| 9 #include "ppapi/shared_impl/input_event_impl.h" | 10 #include "ppapi/shared_impl/input_event_impl.h" |
| 10 #include "ppapi/shared_impl/var.h" | 11 #include "ppapi/shared_impl/var.h" |
| 11 #include "webkit/plugins/ppapi/common.h" | 12 #include "webkit/plugins/ppapi/common.h" |
| 12 #include "webkit/plugins/ppapi/ppb_audio_impl.h" | 13 #include "webkit/plugins/ppapi/ppb_audio_impl.h" |
| 13 #include "webkit/plugins/ppapi/ppb_broker_impl.h" | 14 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 14 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
| 15 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" |
| 16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 17 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" |
| 18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
| 19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 21 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 22 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
| 24 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 25 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 27 #include "webkit/plugins/ppapi/ppb_hello_impl.h" |
| 26 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 27 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 28 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" | 30 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" |
| 29 #include "webkit/plugins/ppapi/ppb_transport_impl.h" | 31 #include "webkit/plugins/ppapi/ppb_transport_impl.h" |
| 30 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 32 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
| 31 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" | 33 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
| 32 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | 34 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
| 33 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 35 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 34 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 36 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 35 | 37 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return PPB_Graphics3D_Impl::Create(instance, share_context, attrib_list); | 173 return PPB_Graphics3D_Impl::Create(instance, share_context, attrib_list); |
| 172 } | 174 } |
| 173 | 175 |
| 174 PP_Resource ResourceCreationImpl::CreateGraphics3DRaw( | 176 PP_Resource ResourceCreationImpl::CreateGraphics3DRaw( |
| 175 PP_Instance instance, | 177 PP_Instance instance, |
| 176 PP_Resource share_context, | 178 PP_Resource share_context, |
| 177 const int32_t* attrib_list) { | 179 const int32_t* attrib_list) { |
| 178 return PPB_Graphics3D_Impl::CreateRaw(instance, share_context, attrib_list); | 180 return PPB_Graphics3D_Impl::CreateRaw(instance, share_context, attrib_list); |
| 179 } | 181 } |
| 180 | 182 |
| 183 PP_Resource ResourceCreationImpl::CreateHello(PP_Instance instance) |
| 184 { |
| 185 LOG(ERROR) << "CreateHello"; |
| 186 return PPB_Hello_Impl::Create(instance); |
| 187 } |
| 188 |
| 181 PP_Resource ResourceCreationImpl::CreateImageData(PP_Instance instance, | 189 PP_Resource ResourceCreationImpl::CreateImageData(PP_Instance instance, |
| 182 PP_ImageDataFormat format, | 190 PP_ImageDataFormat format, |
| 183 const PP_Size& size, | 191 const PP_Size& size, |
| 184 PP_Bool init_to_zero) { | 192 PP_Bool init_to_zero) { |
| 185 return PPB_ImageData_Impl::Create(instance, format, size, init_to_zero); | 193 return PPB_ImageData_Impl::Create(instance, format, size, init_to_zero); |
| 186 } | 194 } |
| 187 | 195 |
| 188 PP_Resource ResourceCreationImpl::CreateKeyboardInputEvent( | 196 PP_Resource ResourceCreationImpl::CreateKeyboardInputEvent( |
| 189 PP_Instance instance, | 197 PP_Instance instance, |
| 190 PP_InputEvent_Type type, | 198 PP_InputEvent_Type type, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 data.wheel_delta = *wheel_delta; | 315 data.wheel_delta = *wheel_delta; |
| 308 data.wheel_ticks = *wheel_ticks; | 316 data.wheel_ticks = *wheel_ticks; |
| 309 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 317 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 310 | 318 |
| 311 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 319 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
| 312 instance, data))->GetReference(); | 320 instance, data))->GetReference(); |
| 313 } | 321 } |
| 314 | 322 |
| 315 } // namespace ppapi | 323 } // namespace ppapi |
| 316 } // namespace webkit | 324 } // namespace webkit |
| OLD | NEW |