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

Unified Diff: ppapi/proxy/flash_resource.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/proxy/flash_resource.h ('k') | ppapi/proxy/flash_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/flash_resource.cc
diff --git a/ppapi/proxy/flash_resource.cc b/ppapi/proxy/flash_resource.cc
index b8dd5c8a50550c14ac74e7d637776711874026ac..afbe6243c1984dd9cf0b910fcd7b51ffffabb677 100644
--- a/ppapi/proxy/flash_resource.cc
+++ b/ppapi/proxy/flash_resource.cc
@@ -4,12 +4,7 @@
#include "ppapi/proxy/flash_resource.h"
-#include "ipc/ipc_message.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/proxy/dispatch_reply_message.h"
#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/shared_impl/array_writer.h"
-#include "ppapi/thunk/enter.h"
namespace ppapi {
namespace proxy {
@@ -26,42 +21,5 @@ thunk::PPB_Flash_Functions_API* FlashResource::AsPPB_Flash_Functions_API() {
return this;
}
-int32_t FlashResource::EnumerateVideoCaptureDevices(
- PP_Instance instance,
- PP_Resource video_capture,
- const PP_ArrayOutput& devices) {
- ArrayWriter output;
- output.set_pp_array_output(devices);
- if (!output.is_valid())
- return PP_ERROR_BADARGUMENT;
-
- thunk::EnterResourceNoLock<thunk::PPB_VideoCapture_API> enter(video_capture,
- true);
- if (enter.failed())
- return PP_ERROR_NOINTERFACE;
-
- std::vector<ppapi::DeviceRefData> device_ref_data;
- int32_t result =
- SyncCall<PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply>(
- RENDERER,
- PpapiHostMsg_Flash_EnumerateVideoCaptureDevices(
- enter.resource()->host_resource()),
- &device_ref_data);
- if (result != PP_OK)
- return result;
-
- std::vector<scoped_refptr<Resource> > device_resources;
- for (size_t i = 0; i < device_ref_data.size(); ++i) {
- scoped_refptr<Resource> resource(new PPB_DeviceRef_Shared(
- OBJECT_IS_PROXY, instance, device_ref_data[i]));
- device_resources.push_back(resource);
- }
-
- if (!output.StoreResourceVector(device_resources))
- return PP_ERROR_FAILED;
-
- return PP_OK;
-}
-
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/flash_resource.h ('k') | ppapi/proxy/flash_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698