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

Unified Diff: ppapi/thunk/ppb_flash_thunk.cc

Issue 11039012: Implement plugin side of sync EnumerateVideoCaptureDevices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months 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_instance_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 85ca39372cbe605bdd74584de0a839fc4b87777a..b95a7242921699815aa81d7d86f12bb207d5ea19 100644
--- a/ppapi/thunk/ppb_flash_thunk.cc
+++ b/ppapi/thunk/ppb_flash_thunk.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ppapi/c/pp_array_output.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/shared_impl/ppapi_globals.h"
@@ -9,6 +10,7 @@
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#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/thunk.h"
@@ -153,6 +155,23 @@ PP_Bool SetCrashData(PP_Instance instance,
return enter.functions()->GetFlashAPI()->SetCrashData(instance, key, value);
}
+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;
+}
+
const PPB_Flash_12_0 g_ppb_flash_12_0_thunk = {
&SetInstanceAlwaysOnTop,
&DrawGlyphs,
@@ -250,6 +269,26 @@ const PPB_Flash_12_5 g_ppb_flash_12_5_thunk = {
&SetCrashData
};
+const PPB_Flash_12_6 g_ppb_flash_12_6_thunk = {
+ &SetInstanceAlwaysOnTop,
+ &DrawGlyphs,
+ &GetProxyForURL,
+ &Navigate,
+ &RunMessageLoop,
+ &QuitMessageLoop,
+ &GetLocalTimeZoneOffset,
+ &GetCommandLineArgs,
+ &PreLoadFontWin,
+ &IsRectTopmost,
+ &InvokePrinting,
+ &UpdateActivity,
+ &GetDeviceID,
+ &GetSettingInt,
+ &GetSetting,
+ &SetCrashData,
+ &EnumerateVideoCaptureDevices
+};
+
} // namespace
const PPB_Flash_12_0* GetPPB_Flash_12_0_Thunk() {
@@ -276,5 +315,9 @@ const PPB_Flash_12_5* GetPPB_Flash_12_5_Thunk() {
return &g_ppb_flash_12_5_thunk;
}
+const PPB_Flash_12_6* GetPPB_Flash_12_6_Thunk() {
+ return &g_ppb_flash_12_6_thunk;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_flash_functions_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698