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/proxy/audio_input_resource.h" | 9 #include "ppapi/proxy/audio_input_resource.h" |
10 #include "ppapi/proxy/browser_font_resource_trusted.h" | 10 #include "ppapi/proxy/browser_font_resource_trusted.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 PP_Instance instance) { | 302 PP_Instance instance) { |
303 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); | 303 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); |
304 } | 304 } |
305 | 305 |
306 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( | 306 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( |
307 PP_Instance instance) { | 307 PP_Instance instance) { |
308 return (new UDPSocketPrivateResource( | 308 return (new UDPSocketPrivateResource( |
309 GetConnection(), instance))->GetReference(); | 309 GetConnection(), instance))->GetReference(); |
310 } | 310 } |
311 | 311 |
| 312 PP_Resource ResourceCreationProxy::CreateVideoDestination( |
| 313 PP_Instance instance) { |
| 314 return (new VideoDestinationResource(GetConnection(), |
| 315 instance))->GetReference(); |
| 316 } |
| 317 |
| 318 PP_Resource ResourceCreationProxy::CreateVideoSource( |
| 319 PP_Instance instance) { |
| 320 return (new VideoSourceResource(GetConnection(), instance))->GetReference(); |
| 321 } |
| 322 |
312 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { | 323 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { |
313 return (new WebSocketResource(GetConnection(), instance))->GetReference(); | 324 return (new WebSocketResource(GetConnection(), instance))->GetReference(); |
314 } | 325 } |
315 | 326 |
316 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( | 327 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( |
317 PP_Instance instance) { | 328 PP_Instance instance) { |
318 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); | 329 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); |
319 } | 330 } |
320 | 331 |
321 #if !defined(OS_NACL) | 332 #if !defined(OS_NACL) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 402 } |
392 | 403 |
393 PP_Resource ResourceCreationProxy::CreateVideoDecoder( | 404 PP_Resource ResourceCreationProxy::CreateVideoDecoder( |
394 PP_Instance instance, | 405 PP_Instance instance, |
395 PP_Resource context3d_id, | 406 PP_Resource context3d_id, |
396 PP_VideoDecoder_Profile profile) { | 407 PP_VideoDecoder_Profile profile) { |
397 return PPB_VideoDecoder_Proxy::CreateProxyResource( | 408 return PPB_VideoDecoder_Proxy::CreateProxyResource( |
398 instance, context3d_id, profile); | 409 instance, context3d_id, profile); |
399 } | 410 } |
400 | 411 |
401 PP_Resource ResourceCreationProxy::CreateVideoDestination( | |
402 PP_Instance instance) { | |
403 return (new VideoDestinationResource(GetConnection(), | |
404 instance))->GetReference(); | |
405 } | |
406 | |
407 PP_Resource ResourceCreationProxy::CreateVideoSource( | |
408 PP_Instance instance) { | |
409 return (new VideoSourceResource(GetConnection(), instance))->GetReference(); | |
410 } | |
411 | |
412 #endif // !defined(OS_NACL) | 412 #endif // !defined(OS_NACL) |
413 | 413 |
414 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 414 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
415 return dispatcher()->Send(msg); | 415 return dispatcher()->Send(msg); |
416 } | 416 } |
417 | 417 |
418 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 418 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
419 return false; | 419 return false; |
420 } | 420 } |
421 | 421 |
422 Connection ResourceCreationProxy::GetConnection() { | 422 Connection ResourceCreationProxy::GetConnection() { |
423 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 423 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
424 } | 424 } |
425 | 425 |
426 } // namespace proxy | 426 } // namespace proxy |
427 } // namespace ppapi | 427 } // namespace ppapi |
OLD | NEW |