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_scrollbar_impl.h" | 15 #include "content/renderer/pepper/ppb_scrollbar_impl.h" |
16 #include "content/renderer/pepper/ppb_video_decoder_impl.h" | 16 #include "content/renderer/pepper/ppb_video_decoder_impl.h" |
17 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" | 17 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" |
18 #include "ppapi/c/pp_size.h" | 18 #include "ppapi/c/pp_size.h" |
19 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 19 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 20 #include "ppapi/shared_impl/ppb_audio_shared.h" |
20 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 21 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
21 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 22 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
22 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | 23 #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
23 #include "ppapi/shared_impl/var.h" | 24 #include "ppapi/shared_impl/var.h" |
24 | 25 |
25 using ppapi::InputEventData; | 26 using ppapi::InputEventData; |
26 using ppapi::PPB_InputEvent_Shared; | 27 using ppapi::PPB_InputEvent_Shared; |
27 using ppapi::PPB_ResourceArray_Shared; | 28 using ppapi::PPB_ResourceArray_Shared; |
28 using ppapi::StringVar; | 29 using ppapi::StringVar; |
29 | 30 |
30 namespace content { | 31 namespace content { |
31 | 32 |
32 ResourceCreationImpl::ResourceCreationImpl(PepperPluginInstanceImpl* instance) { | 33 ResourceCreationImpl::ResourceCreationImpl(PepperPluginInstanceImpl* instance) { |
33 } | 34 } |
34 | 35 |
35 ResourceCreationImpl::~ResourceCreationImpl() { | 36 ResourceCreationImpl::~ResourceCreationImpl() { |
36 } | 37 } |
37 | 38 |
| 39 PP_Resource ResourceCreationImpl::CreateAudio1_0( |
| 40 PP_Instance instance, |
| 41 PP_Resource config_id, |
| 42 PPB_Audio_Callback_1_0 audio_callback, |
| 43 void* user_data) { |
| 44 return PPB_Audio_Impl::Create( |
| 45 instance, config_id, ppapi::AudioCallbackCombined(audio_callback), |
| 46 user_data); |
| 47 } |
| 48 |
38 PP_Resource ResourceCreationImpl::CreateAudio( | 49 PP_Resource ResourceCreationImpl::CreateAudio( |
39 PP_Instance instance, | 50 PP_Instance instance, |
40 PP_Resource config_id, | 51 PP_Resource config_id, |
41 PPB_Audio_Callback audio_callback, | 52 PPB_Audio_Callback audio_callback, |
42 void* user_data) { | 53 void* user_data) { |
43 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, | 54 return PPB_Audio_Impl::Create( |
44 user_data); | 55 instance, config_id, ppapi::AudioCallbackCombined(audio_callback), |
| 56 user_data); |
45 } | 57 } |
46 | 58 |
47 PP_Resource ResourceCreationImpl::CreateAudioConfig( | 59 PP_Resource ResourceCreationImpl::CreateAudioConfig( |
48 PP_Instance instance, | 60 PP_Instance instance, |
49 PP_AudioSampleRate sample_rate, | 61 PP_AudioSampleRate sample_rate, |
50 uint32_t sample_frame_count) { | 62 uint32_t sample_frame_count) { |
51 return ppapi::PPB_AudioConfig_Shared::Create( | 63 return ppapi::PPB_AudioConfig_Shared::Create( |
52 ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); | 64 ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); |
53 } | 65 } |
54 | 66 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 306 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
295 wheel_delta, wheel_ticks, scroll_by_page); | 307 wheel_delta, wheel_ticks, scroll_by_page); |
296 } | 308 } |
297 | 309 |
298 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 310 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
299 PP_Instance instance) { | 311 PP_Instance instance) { |
300 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 312 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
301 } | 313 } |
302 | 314 |
303 } // namespace content | 315 } // namespace content |
OLD | NEW |