| 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" |
| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 uint32_t sample_frame_count) { | 67 uint32_t sample_frame_count) { |
| 67 return ::ppapi::AudioConfigImpl::CreateAsImpl(instance, sample_rate, | 68 return ::ppapi::AudioConfigImpl::CreateAsImpl(instance, sample_rate, |
| 68 sample_frame_count); | 69 sample_frame_count); |
| 69 } | 70 } |
| 70 | 71 |
| 71 PP_Resource ResourceCreationImpl::CreateAudioTrusted( | 72 PP_Resource ResourceCreationImpl::CreateAudioTrusted( |
| 72 PP_Instance instance) { | 73 PP_Instance instance) { |
| 73 return (new PPB_Audio_Impl(instance))->GetReference(); | 74 return (new PPB_Audio_Impl(instance))->GetReference(); |
| 74 } | 75 } |
| 75 | 76 |
| 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 |
| 76 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { | 91 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { |
| 77 return (new PPB_Broker_Impl(instance))->GetReference(); | 92 return (new PPB_Broker_Impl(instance))->GetReference(); |
| 78 } | 93 } |
| 79 | 94 |
| 80 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 95 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
| 81 uint32_t size) { | 96 uint32_t size) { |
| 82 return PPB_Buffer_Impl::Create(instance, size); | 97 return PPB_Buffer_Impl::Create(instance, size); |
| 83 } | 98 } |
| 84 | 99 |
| 85 PP_Resource ResourceCreationImpl::CreateContext3D( | 100 PP_Resource ResourceCreationImpl::CreateContext3D( |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 data.wheel_delta = *wheel_delta; | 322 data.wheel_delta = *wheel_delta; |
| 308 data.wheel_ticks = *wheel_ticks; | 323 data.wheel_ticks = *wheel_ticks; |
| 309 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 324 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 310 | 325 |
| 311 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 326 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
| 312 instance, data))->GetReference(); | 327 instance, data))->GetReference(); |
| 313 } | 328 } |
| 314 | 329 |
| 315 } // namespace ppapi | 330 } // namespace ppapi |
| 316 } // namespace webkit | 331 } // namespace webkit |
| OLD | NEW |