summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/video_source_resource.cc
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 07:59:15 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 07:59:15 +0000
commit558c1905c0a070531c4cbd592c9052a16ab61d20 (patch)
treee4840f9ca421d08cb47ac228a80b98eee1c6df1a /ppapi/proxy/video_source_resource.cc
parent31ce1bd018ad86c1e65cf70c487ce7971f12e3d1 (diff)
downloadchromium_src-558c1905c0a070531c4cbd592c9052a16ab61d20.zip
chromium_src-558c1905c0a070531c4cbd592c9052a16ab61d20.tar.gz
chromium_src-558c1905c0a070531c4cbd592c9052a16ab61d20.tar.bz2
Add NaCl proxies for Pepper Video Source and Destination resources.
I need to add whitelist testing to prevent arbitrary NaCl apps from using these resources. BUG=230980 TEST=browser_tests, --gtest_filter="PPAPINaClPNaClTest.Video*" Review URL: https://chromiumcodereview.appspot.com/16335018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/video_source_resource.cc')
-rw-r--r--ppapi/proxy/video_source_resource.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/ppapi/proxy/video_source_resource.cc b/ppapi/proxy/video_source_resource.cc
index f6c5fdc..c294903 100644
--- a/ppapi/proxy/video_source_resource.cc
+++ b/ppapi/proxy/video_source_resource.cc
@@ -66,7 +66,6 @@ int32_t VideoSourceResource::GetFrame(
return PP_ERROR_INPROGRESS;
get_frame_callback_ = callback;
-
Call<PpapiPluginMsg_VideoSource_GetFrameReply>(RENDERER,
PpapiHostMsg_VideoSource_GetFrame(),
base::Bind(&VideoSourceResource::OnPluginMsgGetFrameComplete, this,
@@ -98,7 +97,6 @@ void VideoSourceResource::OnPluginMsgGetFrameComplete(
const ResourceMessageReplyParams& reply_params,
const HostResource& image_data,
const PP_ImageDataDesc& image_desc,
- int fd,
PP_TimeTicks timestamp) {
// The callback may have been aborted by Close().
if (TrackedCallback::IsPending(get_frame_callback_)) {
@@ -107,21 +105,12 @@ void VideoSourceResource::OnPluginMsgGetFrameComplete(
PPB_ImageData_Shared::IsImageDataDescValid(image_desc)) {
frame->timestamp = timestamp;
-#if defined(OS_ANDROID)
- frame->image_data = 0;
-#elif defined(TOOLKIT_GTK)
- frame->image_data =
- (new PlatformImageData(image_data, image_desc, fd))->GetReference();
-#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)
base::SharedMemoryHandle handle;
if (!reply_params.TakeSharedMemoryHandleAtIndex(0, &handle))
frame->image_data = 0;
frame->image_data =
- (new PlatformImageData(
+ (new SimpleImageData(
image_data, image_desc, handle))->GetReference();
-#else
-#error Not implemented.
-#endif
}
get_frame_callback_->Run(result);
}