Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/resource_creation_impl.h" | 5 #include "content/renderer/pepper/resource_creation_impl.h" |
| 6 | 6 |
| 7 #include "content/renderer/pepper/common.h" | 7 #include "content/renderer/pepper/common.h" |
| 8 #include "content/renderer/pepper/ppb_audio_impl.h" | 8 #include "content/renderer/pepper/ppb_audio_impl.h" |
| 9 #include "content/renderer/pepper/ppb_broker_impl.h" | 9 #include "content/renderer/pepper/ppb_broker_impl.h" |
| 10 #include "content/renderer/pepper/ppb_buffer_impl.h" | 10 #include "content/renderer/pepper/ppb_buffer_impl.h" |
| 11 #include "content/renderer/pepper/ppb_file_ref_impl.h" | 11 #include "content/renderer/pepper/ppb_file_ref_impl.h" |
| 12 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" | 12 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" |
| 13 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" | 13 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
| 14 #include "content/renderer/pepper/ppb_image_data_impl.h" | 14 #include "content/renderer/pepper/ppb_image_data_impl.h" |
| 15 #include "content/renderer/pepper/ppb_network_monitor_private_impl.h" | 15 #include "content/renderer/pepper/ppb_network_monitor_private_impl.h" |
| 16 #include "content/renderer/pepper/ppb_scrollbar_impl.h" | 16 #include "content/renderer/pepper/ppb_scrollbar_impl.h" |
| 17 #include "content/renderer/pepper/ppb_tcp_server_socket_private_impl.h" | 17 #include "content/renderer/pepper/ppb_tcp_server_socket_private_impl.h" |
| 18 #include "content/renderer/pepper/ppb_tcp_socket_private_impl.h" | 18 #include "content/renderer/pepper/ppb_tcp_socket_private_impl.h" |
| 19 #include "content/renderer/pepper/ppb_video_decoder_impl.h" | 19 #include "content/renderer/pepper/ppb_video_decoder_impl.h" |
| 20 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" | 20 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" |
| 21 #include "content/renderer/pepper/resource_helper.h" | 21 #include "content/renderer/pepper/resource_helper.h" |
| 22 #include "ppapi/c/pp_size.h" | 22 #include "ppapi/c/pp_size.h" |
| 23 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 23 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 24 #include "ppapi/shared_impl/ppb_audio_shared.h" | |
| 24 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 25 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
| 25 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 26 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 26 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | 27 #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
| 27 #include "ppapi/shared_impl/var.h" | 28 #include "ppapi/shared_impl/var.h" |
| 28 | 29 |
| 29 using ppapi::InputEventData; | 30 using ppapi::InputEventData; |
| 30 using ppapi::PPB_InputEvent_Shared; | 31 using ppapi::PPB_InputEvent_Shared; |
| 31 using ppapi::PPB_ResourceArray_Shared; | 32 using ppapi::PPB_ResourceArray_Shared; |
| 32 using ppapi::StringVar; | 33 using ppapi::StringVar; |
| 33 | 34 |
| 34 namespace content { | 35 namespace content { |
| 35 | 36 |
| 36 ResourceCreationImpl::ResourceCreationImpl(PepperPluginInstanceImpl* instance) { | 37 ResourceCreationImpl::ResourceCreationImpl(PepperPluginInstanceImpl* instance) { |
| 37 } | 38 } |
| 38 | 39 |
| 39 ResourceCreationImpl::~ResourceCreationImpl() { | 40 ResourceCreationImpl::~ResourceCreationImpl() { |
| 40 } | 41 } |
| 41 | 42 |
| 43 PP_Resource ResourceCreationImpl::CreateAudio1_0( | |
| 44 PP_Instance instance, | |
| 45 PP_Resource config_id, | |
| 46 PPB_Audio_Callback_1_0 audio_callback, | |
| 47 void* user_data) { | |
| 48 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, user_data); | |
|
dmichael (off chromium)
2013/08/06 19:43:25
note: You're currently relying on an implicit conv
yzshen1
2013/08/07 20:51:06
Done.
| |
| 49 } | |
| 50 | |
| 42 PP_Resource ResourceCreationImpl::CreateAudio( | 51 PP_Resource ResourceCreationImpl::CreateAudio( |
| 43 PP_Instance instance, | 52 PP_Instance instance, |
| 44 PP_Resource config_id, | 53 PP_Resource config_id, |
| 45 PPB_Audio_Callback audio_callback, | 54 PPB_Audio_Callback audio_callback, |
| 46 void* user_data) { | 55 void* user_data) { |
| 47 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, | 56 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, user_data); |
| 48 user_data); | |
| 49 } | 57 } |
| 50 | 58 |
| 51 PP_Resource ResourceCreationImpl::CreateAudioConfig( | 59 PP_Resource ResourceCreationImpl::CreateAudioConfig( |
| 52 PP_Instance instance, | 60 PP_Instance instance, |
| 53 PP_AudioSampleRate sample_rate, | 61 PP_AudioSampleRate sample_rate, |
| 54 uint32_t sample_frame_count) { | 62 uint32_t sample_frame_count) { |
| 55 return ::ppapi::PPB_AudioConfig_Shared::Create( | 63 return ::ppapi::PPB_AudioConfig_Shared::Create( |
| 56 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); | 64 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); |
| 57 } | 65 } |
| 58 | 66 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 314 ::ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
| 307 wheel_delta, wheel_ticks, scroll_by_page); | 315 wheel_delta, wheel_ticks, scroll_by_page); |
| 308 } | 316 } |
| 309 | 317 |
| 310 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 318 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
| 311 PP_Instance instance) { | 319 PP_Instance instance) { |
| 312 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 320 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
| 313 } | 321 } |
| 314 | 322 |
| 315 } // namespace content | 323 } // namespace content |
| OLD | NEW |