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

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: export 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
« no previous file with comments | « ppapi/thunk/ppb_flash_functions_api.h ('k') | ppapi/thunk/ppb_video_capture_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ec8e17e326fb957706c5b67852086551e40e4b3c 100644
--- a/ppapi/thunk/ppb_flash_thunk.cc
+++ b/ppapi/thunk/ppb_flash_thunk.cc
@@ -12,6 +12,7 @@
#include "ppapi/thunk/ppb_flash_api.h"
#include "ppapi/thunk/ppb_flash_functions_api.h"
#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/ppb_video_capture_api.h"
#include "ppapi/thunk/thunk.h"
namespace ppapi {
@@ -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 = {
« no previous file with comments | « ppapi/thunk/ppb_flash_functions_api.h ('k') | ppapi/thunk/ppb_video_capture_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698