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

Unified Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.cc

Issue 6899055: PPAPI: Force async callback invocation option. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: webkit/plugins/ppapi/ppb_video_decoder_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_video_decoder_impl.cc (revision 88104)
+++ webkit/plugins/ppapi/ppb_video_decoder_impl.cc (working copy)
@@ -59,9 +59,10 @@
scoped_refptr<PPB_VideoDecoder_Impl> decoder(
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder));
if (!decoder)
- return PP_ERROR_BADRESOURCE;
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE);
- return decoder->Initialize(decoder_config, callback);
+ int32_t result =decoder->Initialize(decoder_config, callback);
piman 2011/06/07 17:32:14 nit: space after =
polina 2011/06/09 23:53:51 Done.
+ return MayForceCallback(callback, result);
}
PP_Bool IsVideoDecoder(PP_Resource resource) {
@@ -74,9 +75,10 @@
scoped_refptr<PPB_VideoDecoder_Impl> decoder(
Resource::GetAs<PPB_VideoDecoder_Impl>(decoder_id));
if (!decoder)
- return PP_ERROR_BADRESOURCE;
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE);
- return decoder->Decode(bitstream_buffer, callback);
+ int32_t result = decoder->Decode(bitstream_buffer, callback);
+ return MayForceCallback(callback, result);
}
void AssignGLESBuffers(PP_Resource video_decoder,
@@ -114,9 +116,9 @@
scoped_refptr<PPB_VideoDecoder_Impl> decoder(
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder));
if (!decoder)
- return PP_ERROR_BADRESOURCE;
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE);
- return decoder->Flush(callback);
+ return MayForceCallback(callback, decoder->Flush(callback));
}
int32_t Abort(PP_Resource video_decoder,
@@ -124,9 +126,9 @@
scoped_refptr<PPB_VideoDecoder_Impl> decoder(
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder));
if (!decoder)
- return PP_ERROR_BADRESOURCE;
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE);
- return decoder->Abort(callback);
+ return MayForceCallback(callback, decoder->Abort(callback));
}
const PPB_VideoDecoder_Dev ppb_videodecoder = {
« webkit/plugins/ppapi/common.h ('K') | « webkit/plugins/ppapi/ppb_url_loader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698