Chromium Code Reviews| Index: content/renderer/pepper/pepper_flash_host.cc |
| diff --git a/content/renderer/pepper/pepper_flash_host.cc b/content/renderer/pepper/pepper_flash_host.cc |
| index d2e9f6f2337489969bfb86d6fd731caad8e20f46..f8c293c439f3af73e5cd23211ccd6626ed0caf62 100644 |
| --- a/content/renderer/pepper/pepper_flash_host.cc |
| +++ b/content/renderer/pepper/pepper_flash_host.cc |
| @@ -4,21 +4,7 @@ |
| #include "content/renderer/pepper/pepper_flash_host.h" |
| -#include <vector> |
| - |
| #include "content/public/renderer/renderer_ppapi_host.h" |
| -#include "ipc/ipc_message_macros.h" |
| -#include "ppapi/c/pp_errors.h" |
| -#include "ppapi/host/dispatch_host_message.h" |
| -#include "ppapi/host/ppapi_host.h" |
| -#include "ppapi/proxy/enter_proxy.h" |
| -#include "ppapi/proxy/ppapi_messages.h" |
| -#include "ppapi/proxy/resource_message_params.h" |
| -#include "ppapi/thunk/ppb_video_capture_api.h" |
| - |
| -using ppapi::proxy::EnterHostFromHostResource; |
| -using ppapi::proxy::EnterHostFromHostResourceForceCallback; |
| -using ppapi::thunk::PPB_VideoCapture_API; |
| namespace content { |
| @@ -26,57 +12,10 @@ PepperFlashHost::PepperFlashHost( |
| RendererPpapiHost* host, |
| PP_Instance instance, |
| PP_Resource resource) |
| - : ResourceHost(host->GetPpapiHost(), instance, resource), |
| - callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| + : ResourceHost(host->GetPpapiHost(), instance, resource) { |
| } |
| PepperFlashHost::~PepperFlashHost() { |
| } |
| -int32_t PepperFlashHost::OnResourceMessageReceived( |
|
raymes
2012/11/13 15:54:16
Please leave this here and just return PP_ERROR_FA
victorhsieh
2012/11/14 01:07:50
Done.
|
| - const IPC::Message& msg, |
| - ppapi::host::HostMessageContext* context) { |
| - IPC_BEGIN_MESSAGE_MAP(PepperFlashHost, msg) |
| - PPAPI_DISPATCH_HOST_RESOURCE_CALL( |
| - PpapiHostMsg_Flash_EnumerateVideoCaptureDevices, |
| - OnMsgEnumerateVideoCaptureDevices) |
| - IPC_END_MESSAGE_MAP() |
| - return PP_ERROR_FAILED; |
| -} |
| - |
| -int32_t PepperFlashHost::OnMsgEnumerateVideoCaptureDevices( |
| - ppapi::host::HostMessageContext* host_context, |
| - const ppapi::HostResource& host_resource) { |
| - EnterHostFromHostResourceForceCallback<PPB_VideoCapture_API> enter( |
| - host_resource, callback_factory_, |
| - &PepperFlashHost::OnEnumerateVideoCaptureDevicesComplete, |
| - host_context->MakeReplyMessageContext(), |
| - host_resource); |
| - if (enter.succeeded()) { |
| - // We don't want the output to go into a PP_ResourceArray (which is |
| - // deprecated), so just pass in NULL. We'll grab the DeviceRefData vector |
| - // in the callback and convert it to a PP_ArrayOutput in the plugin. |
| - enter.SetResult(enter.object()->EnumerateDevices(NULL, enter.callback())); |
| - } |
| - return PP_OK_COMPLETIONPENDING; |
| -} |
| - |
| -void PepperFlashHost::OnEnumerateVideoCaptureDevicesComplete( |
| - int32_t result, |
| - ppapi::host::ReplyMessageContext reply_message_context, |
| - const ppapi::HostResource& host_resource) { |
| - std::vector<ppapi::DeviceRefData> devices; |
| - if (result == PP_OK) { |
| - EnterHostFromHostResource<PPB_VideoCapture_API> enter(host_resource); |
| - if (enter.succeeded()) |
| - devices = enter.object()->GetDeviceRefData(); |
| - else |
| - result = PP_ERROR_FAILED; |
| - } |
| - reply_message_context.params.set_result(result); |
| - host()->SendReply(reply_message_context, |
| - PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply(devices)); |
| -} |
| - |
| } // namespace content |
| - |