| 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" |
| 11 #include "webkit/plugins/ppapi/common.h" | 11 #include "webkit/plugins/ppapi/common.h" |
| 12 #include "webkit/plugins/ppapi/ppb_audio_impl.h" | 12 #include "webkit/plugins/ppapi/ppb_audio_impl.h" |
| 13 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" | |
| 14 #include "webkit/plugins/ppapi/ppb_broker_impl.h" | 13 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 14 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
| 16 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" |
| 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 18 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" |
| 19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
| 20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 uint32_t sample_frame_count) { | 66 uint32_t sample_frame_count) { |
| 68 return ::ppapi::AudioConfigImpl::CreateAsImpl(instance, sample_rate, | 67 return ::ppapi::AudioConfigImpl::CreateAsImpl(instance, sample_rate, |
| 69 sample_frame_count); | 68 sample_frame_count); |
| 70 } | 69 } |
| 71 | 70 |
| 72 PP_Resource ResourceCreationImpl::CreateAudioTrusted( | 71 PP_Resource ResourceCreationImpl::CreateAudioTrusted( |
| 73 PP_Instance instance) { | 72 PP_Instance instance) { |
| 74 return (new PPB_Audio_Impl(instance))->GetReference(); | 73 return (new PPB_Audio_Impl(instance))->GetReference(); |
| 75 } | 74 } |
| 76 | 75 |
| 77 PP_Resource ResourceCreationImpl::CreateAudioInput( | |
| 78 PP_Instance instance, | |
| 79 PP_Resource config_id, | |
| 80 PPB_AudioInput_Callback audio_input_callback, | |
| 81 void* user_data) { | |
| 82 return PPB_AudioInput_Impl::Create(instance, config_id, | |
| 83 audio_input_callback, user_data); | |
| 84 } | |
| 85 | |
| 86 PP_Resource ResourceCreationImpl::CreateAudioInputTrusted( | |
| 87 PP_Instance instance) { | |
| 88 return (new PPB_AudioInput_Impl(instance))->GetReference(); | |
| 89 } | |
| 90 | |
| 91 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { | 76 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { |
| 92 return (new PPB_Broker_Impl(instance))->GetReference(); | 77 return (new PPB_Broker_Impl(instance))->GetReference(); |
| 93 } | 78 } |
| 94 | 79 |
| 95 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 80 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
| 96 uint32_t size) { | 81 uint32_t size) { |
| 97 return PPB_Buffer_Impl::Create(instance, size); | 82 return PPB_Buffer_Impl::Create(instance, size); |
| 98 } | 83 } |
| 99 | 84 |
| 100 PP_Resource ResourceCreationImpl::CreateContext3D( | 85 PP_Resource ResourceCreationImpl::CreateContext3D( |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 data.wheel_delta = *wheel_delta; | 306 data.wheel_delta = *wheel_delta; |
| 322 data.wheel_ticks = *wheel_ticks; | 307 data.wheel_ticks = *wheel_ticks; |
| 323 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 308 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 324 | 309 |
| 325 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 310 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
| 326 instance, data))->GetReference(); | 311 instance, data))->GetReference(); |
| 327 } | 312 } |
| 328 | 313 |
| 329 } // namespace ppapi | 314 } // namespace ppapi |
| 330 } // namespace webkit | 315 } // namespace webkit |
| OLD | NEW |