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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { | 322 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { |
323 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); | 323 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); |
324 } | 324 } |
325 | 325 |
326 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( | 326 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( |
327 PP_Instance instance) { | 327 PP_Instance instance) { |
328 return (new UDPSocketPrivateResource( | 328 return (new UDPSocketPrivateResource( |
329 GetConnection(), instance))->GetReference(); | 329 GetConnection(), instance))->GetReference(); |
330 } | 330 } |
331 | 331 |
| 332 PP_Resource ResourceCreationProxy::CreateVideoDestination( |
| 333 PP_Instance instance) { |
| 334 return (new VideoDestinationResource(GetConnection(), |
| 335 instance))->GetReference(); |
| 336 } |
| 337 |
| 338 PP_Resource ResourceCreationProxy::CreateVideoSource( |
| 339 PP_Instance instance) { |
| 340 return (new VideoSourceResource(GetConnection(), instance))->GetReference(); |
| 341 } |
| 342 |
332 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { | 343 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { |
333 return (new WebSocketResource(GetConnection(), instance))->GetReference(); | 344 return (new WebSocketResource(GetConnection(), instance))->GetReference(); |
334 } | 345 } |
335 | 346 |
336 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( | 347 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( |
337 PP_Instance instance) { | 348 PP_Instance instance) { |
338 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); | 349 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); |
339 } | 350 } |
340 | 351 |
341 #if !defined(OS_NACL) | 352 #if !defined(OS_NACL) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 } | 422 } |
412 | 423 |
413 PP_Resource ResourceCreationProxy::CreateVideoDecoder( | 424 PP_Resource ResourceCreationProxy::CreateVideoDecoder( |
414 PP_Instance instance, | 425 PP_Instance instance, |
415 PP_Resource context3d_id, | 426 PP_Resource context3d_id, |
416 PP_VideoDecoder_Profile profile) { | 427 PP_VideoDecoder_Profile profile) { |
417 return PPB_VideoDecoder_Proxy::CreateProxyResource( | 428 return PPB_VideoDecoder_Proxy::CreateProxyResource( |
418 instance, context3d_id, profile); | 429 instance, context3d_id, profile); |
419 } | 430 } |
420 | 431 |
421 PP_Resource ResourceCreationProxy::CreateVideoDestination( | |
422 PP_Instance instance) { | |
423 return (new VideoDestinationResource(GetConnection(), | |
424 instance))->GetReference(); | |
425 } | |
426 | |
427 PP_Resource ResourceCreationProxy::CreateVideoSource( | |
428 PP_Instance instance) { | |
429 return (new VideoSourceResource(GetConnection(), instance))->GetReference(); | |
430 } | |
431 | |
432 #endif // !defined(OS_NACL) | 432 #endif // !defined(OS_NACL) |
433 | 433 |
434 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 434 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
435 return dispatcher()->Send(msg); | 435 return dispatcher()->Send(msg); |
436 } | 436 } |
437 | 437 |
438 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 438 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
439 return false; | 439 return false; |
440 } | 440 } |
441 | 441 |
442 Connection ResourceCreationProxy::GetConnection() { | 442 Connection ResourceCreationProxy::GetConnection() { |
443 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 443 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
444 } | 444 } |
445 | 445 |
446 } // namespace proxy | 446 } // namespace proxy |
447 } // namespace ppapi | 447 } // namespace ppapi |
OLD | NEW |