| 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/connection.h" | 10 #include "ppapi/proxy/connection.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 } | 451 } |
| 452 | 452 |
| 453 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) { | 453 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) { |
| 454 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 454 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| 455 if (!dispatcher) | 455 if (!dispatcher) |
| 456 return 0; | 456 return 0; |
| 457 return (new VideoCaptureResource(GetConnection(), instance, dispatcher)) | 457 return (new VideoCaptureResource(GetConnection(), instance, dispatcher)) |
| 458 ->GetReference(); | 458 ->GetReference(); |
| 459 } | 459 } |
| 460 | 460 |
| 461 PP_Resource ResourceCreationProxy::CreateVideoDecoder( | 461 PP_Resource ResourceCreationProxy::CreateVideoDecoderDev( |
| 462 PP_Instance instance, | 462 PP_Instance instance, |
| 463 PP_Resource context3d_id, | 463 PP_Resource context3d_id, |
| 464 PP_VideoDecoder_Profile profile) { | 464 PP_VideoDecoder_Profile profile) { |
| 465 return PPB_VideoDecoder_Proxy::CreateProxyResource( | 465 return PPB_VideoDecoder_Proxy::CreateProxyResource( |
| 466 instance, context3d_id, profile); | 466 instance, context3d_id, profile); |
| 467 } | 467 } |
| 468 | 468 |
| 469 #endif // !defined(OS_NACL) | 469 #endif // !defined(OS_NACL) |
| 470 | 470 |
| 471 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 471 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
| 472 return dispatcher()->Send(msg); | 472 return dispatcher()->Send(msg); |
| 473 } | 473 } |
| 474 | 474 |
| 475 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 475 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 476 return false; | 476 return false; |
| 477 } | 477 } |
| 478 | 478 |
| 479 Connection ResourceCreationProxy::GetConnection() { | 479 Connection ResourceCreationProxy::GetConnection() { |
| 480 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 480 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace proxy | 483 } // namespace proxy |
| 484 } // namespace ppapi | 484 } // namespace ppapi |
| OLD | NEW |