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..c4468b62f04f27ea5bd3fe5918c6cc943162f6da 100644 |
--- a/content/renderer/pepper/pepper_flash_host.cc |
+++ b/content/renderer/pepper/pepper_flash_host.cc |
@@ -4,21 +4,8 @@ |
#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,8 +13,7 @@ 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() { |
@@ -36,47 +22,6 @@ PepperFlashHost::~PepperFlashHost() { |
int32_t PepperFlashHost::OnResourceMessageReceived( |
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 |
- |