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 "ppapi/proxy/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 PP_Resource ResourceCreationProxy::CreateAudioConfig( | 161 PP_Resource ResourceCreationProxy::CreateAudioConfig( |
162 PP_Instance instance, | 162 PP_Instance instance, |
163 PP_AudioSampleRate sample_rate, | 163 PP_AudioSampleRate sample_rate, |
164 uint32_t sample_frame_count) { | 164 uint32_t sample_frame_count) { |
165 return PPB_AudioConfig_Shared::Create( | 165 return PPB_AudioConfig_Shared::Create( |
166 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count); | 166 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count); |
167 } | 167 } |
168 | 168 |
| 169 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, |
| 170 PP_ImageDataFormat format, |
| 171 const PP_Size& size, |
| 172 PP_Bool init_to_zero) { |
| 173 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size, |
| 174 init_to_zero); |
| 175 } |
| 176 |
169 #if !defined(OS_NACL) | 177 #if !defined(OS_NACL) |
170 PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) { | 178 PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) { |
171 // Proxied plugins can't create trusted audio devices. | 179 // Proxied plugins can't create trusted audio devices. |
172 return 0; | 180 return 0; |
173 } | 181 } |
174 | 182 |
175 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( | 183 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( |
176 PP_Instance instance, | 184 PP_Instance instance, |
177 PP_Resource config_id, | 185 PP_Resource config_id, |
178 PPB_AudioInput_Callback audio_input_callback, | 186 PPB_AudioInput_Callback audio_input_callback, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 PP_Bool is_always_opaque) { | 244 PP_Bool is_always_opaque) { |
237 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, | 245 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, |
238 is_always_opaque); | 246 is_always_opaque); |
239 } | 247 } |
240 | 248 |
241 PP_Resource ResourceCreationProxy::CreateHostResolverPrivate( | 249 PP_Resource ResourceCreationProxy::CreateHostResolverPrivate( |
242 PP_Instance instance) { | 250 PP_Instance instance) { |
243 return PPB_HostResolver_Private_Proxy::CreateProxyResource(instance); | 251 return PPB_HostResolver_Private_Proxy::CreateProxyResource(instance); |
244 } | 252 } |
245 | 253 |
246 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, | |
247 PP_ImageDataFormat format, | |
248 const PP_Size& size, | |
249 PP_Bool init_to_zero) { | |
250 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size, | |
251 init_to_zero); | |
252 } | |
253 | |
254 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( | 254 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( |
255 PP_Instance instance, | 255 PP_Instance instance, |
256 PPB_NetworkMonitor_Callback callback, | 256 PPB_NetworkMonitor_Callback callback, |
257 void* user_data) { | 257 void* user_data) { |
258 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( | 258 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( |
259 instance, callback, user_data); | 259 instance, callback, user_data); |
260 } | 260 } |
261 | 261 |
262 PP_Resource ResourceCreationProxy::CreateGraphics3D( | 262 PP_Resource ResourceCreationProxy::CreateGraphics3D( |
263 PP_Instance instance, | 263 PP_Instance instance, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 342 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
343 return dispatcher()->Send(msg); | 343 return dispatcher()->Send(msg); |
344 } | 344 } |
345 | 345 |
346 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 346 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
347 return false; | 347 return false; |
348 } | 348 } |
349 | 349 |
350 } // namespace proxy | 350 } // namespace proxy |
351 } // namespace ppapi | 351 } // namespace ppapi |
OLD | NEW |