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

Unified Diff: ppapi/proxy/flash_resource.cc

Issue 11028104: Add template SyncCall() to PluginResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync & resolve 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/proxy/flash_font_file_resource.cc ('k') | ppapi/proxy/plugin_resource.h » ('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 62e97e16798b7559e9cf893ef115b41f102b9caa..41bec16abaa1c714488b1a5c2d8fcedde553c6c6 100644
--- a/ppapi/proxy/flash_resource.cc
+++ b/ppapi/proxy/flash_resource.cc
@@ -39,17 +39,15 @@ int32_t FlashResource::EnumerateVideoCaptureDevices(
if (enter.failed())
return PP_ERROR_NOINTERFACE;
- IPC::Message reply;
std::vector<ppapi::DeviceRefData> device_ref_data;
- int32_t result = CallRendererSync(
- PpapiHostMsg_Flash_EnumerateVideoCaptureDevices(
- enter.resource()->host_resource()), &reply);
+ int32_t result =
+ SyncCall<PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply>(
+ RENDERER,
+ PpapiHostMsg_Flash_EnumerateVideoCaptureDevices(
+ enter.resource()->host_resource()),
+ &device_ref_data);
if (result != PP_OK)
return result;
- PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply::Schema::Param p;
- if (!PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply::Read(&reply, &p))
- return PP_ERROR_FAILED;
- device_ref_data = p.a;
std::vector<scoped_refptr<Resource> > device_resources;
for (size_t i = 0; i < device_ref_data.size(); ++i) {
« no previous file with comments | « ppapi/proxy/flash_font_file_resource.cc ('k') | ppapi/proxy/plugin_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698