Index: ppapi/thunk/ppb_flash_thunk.cc |
diff --git a/ppapi/thunk/ppb_flash_thunk.cc b/ppapi/thunk/ppb_flash_thunk.cc |
index b95a7242921699815aa81d7d86f12bb207d5ea19..b01300903c3b0effe617bd07c1d3819d6612fcc7 100644 |
--- a/ppapi/thunk/ppb_flash_thunk.cc |
+++ b/ppapi/thunk/ppb_flash_thunk.cc |
@@ -11,6 +11,7 @@ |
#include "ppapi/thunk/enter.h" |
#include "ppapi/thunk/ppb_flash_api.h" |
#include "ppapi/thunk/ppb_flash_functions_api.h" |
+#include "ppapi/thunk/ppb_video_capture_api.h" |
#include "ppapi/thunk/ppb_instance_api.h" |
#include "ppapi/thunk/thunk.h" |
@@ -158,18 +159,10 @@ PP_Bool SetCrashData(PP_Instance instance, |
int32_t EnumerateVideoCaptureDevices(PP_Instance instance, |
PP_Resource video_capture, |
PP_ArrayOutput devices) { |
- EnterInstance enter(instance); |
- if (enter.succeeded()) { |
- PPB_Flash_Functions_API* api = |
- enter.functions()->GetFlashFunctionsAPI(instance); |
- if (api) { |
- return api->EnumerateVideoCaptureDevices(instance, video_capture, |
- devices); |
- } else { |
- return PP_ERROR_NOINTERFACE; |
- } |
- } |
- return PP_ERROR_BADRESOURCE; |
+ thunk::EnterResource<thunk::PPB_VideoCapture_API> enter(video_capture, true); |
+ if (enter.failed()) |
+ return enter.retval(); |
+ return enter.object()->EnumerateDevicesSync(&devices); |
} |
const PPB_Flash_12_0 g_ppb_flash_12_0_thunk = { |