Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: ppapi/thunk/ppb_flash_thunk.cc

Issue 11274036: Refactor video capture to new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 = {

Powered by Google App Engine
This is Rietveld 408576698