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 "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/ppb_audio_config_shared.h" | 8 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" | 9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" |
10 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 ResourceCreationImpl::~ResourceCreationImpl() { | 55 ResourceCreationImpl::~ResourceCreationImpl() { |
56 } | 56 } |
57 | 57 |
58 ::ppapi::thunk::ResourceCreationAPI* | 58 ::ppapi::thunk::ResourceCreationAPI* |
59 ResourceCreationImpl::AsResourceCreationAPI() { | 59 ResourceCreationImpl::AsResourceCreationAPI() { |
60 return this; | 60 return this; |
61 } | 61 } |
62 | 62 |
| 63 PP_Resource ResourceCreationImpl::CreateAudioInput0_1( |
| 64 PP_Instance instance, |
| 65 PP_Resource config_id, |
| 66 PPB_AudioInput_Callback audio_input_callback, |
| 67 void* user_data) { |
| 68 return PPB_AudioInput_Impl::Create0_1(instance, config_id, |
| 69 audio_input_callback, user_data); |
| 70 } |
| 71 |
63 PP_Resource ResourceCreationImpl::CreateAudio( | 72 PP_Resource ResourceCreationImpl::CreateAudio( |
64 PP_Instance instance, | 73 PP_Instance instance, |
65 PP_Resource config_id, | 74 PP_Resource config_id, |
66 PPB_Audio_Callback audio_callback, | 75 PPB_Audio_Callback audio_callback, |
67 void* user_data) { | 76 void* user_data) { |
68 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, | 77 return PPB_Audio_Impl::Create(instance, config_id, audio_callback, |
69 user_data); | 78 user_data); |
70 } | 79 } |
71 | 80 |
72 PP_Resource ResourceCreationImpl::CreateAudioConfig( | 81 PP_Resource ResourceCreationImpl::CreateAudioConfig( |
73 PP_Instance instance, | 82 PP_Instance instance, |
74 PP_AudioSampleRate sample_rate, | 83 PP_AudioSampleRate sample_rate, |
75 uint32_t sample_frame_count) { | 84 uint32_t sample_frame_count) { |
76 return ::ppapi::PPB_AudioConfig_Shared::Create( | 85 return ::ppapi::PPB_AudioConfig_Shared::Create( |
77 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); | 86 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); |
78 } | 87 } |
79 | 88 |
80 PP_Resource ResourceCreationImpl::CreateAudioTrusted( | 89 PP_Resource ResourceCreationImpl::CreateAudioTrusted( |
81 PP_Instance instance) { | 90 PP_Instance instance) { |
82 return (new PPB_Audio_Impl(instance))->GetReference(); | 91 return (new PPB_Audio_Impl(instance))->GetReference(); |
83 } | 92 } |
84 | 93 |
85 PP_Resource ResourceCreationImpl::CreateAudioInput0_1( | |
86 PP_Instance instance, | |
87 PP_Resource config_id, | |
88 PPB_AudioInput_Callback audio_input_callback, | |
89 void* user_data) { | |
90 return PPB_AudioInput_Impl::Create0_1(instance, config_id, | |
91 audio_input_callback, user_data); | |
92 } | |
93 | |
94 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) { | 94 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) { |
95 return (new PPB_AudioInput_Impl(instance))->GetReference(); | 95 return (new PPB_AudioInput_Impl(instance))->GetReference(); |
96 } | 96 } |
97 | 97 |
98 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { | 98 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { |
99 return (new PPB_Broker_Impl(instance))->GetReference(); | 99 return (new PPB_Broker_Impl(instance))->GetReference(); |
100 } | 100 } |
101 | 101 |
102 PP_Resource ResourceCreationImpl::CreateBrowserFont( | 102 PP_Resource ResourceCreationImpl::CreateBrowserFont( |
103 PP_Instance instance, | 103 PP_Instance instance, |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 instance, data))->GetReference(); | 347 instance, data))->GetReference(); |
348 } | 348 } |
349 | 349 |
350 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 350 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
351 PP_Instance instance) { | 351 PP_Instance instance) { |
352 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 352 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
353 } | 353 } |
354 | 354 |
355 } // namespace ppapi | 355 } // namespace ppapi |
356 } // namespace webkit | 356 } // namespace webkit |
OLD | NEW |