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

Unified Diff: ppapi/shared_impl/ppb_video_decoder_shared.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. 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
Index: ppapi/shared_impl/ppb_video_decoder_shared.cc
diff --git a/ppapi/shared_impl/ppb_video_decoder_shared.cc b/ppapi/shared_impl/ppb_video_decoder_shared.cc
index 441b0d21cc7e41db352eafa892a0649859959f97..e2547aa3ac7226e757ba1ea4a10f2c96c295d53d 100644
--- a/ppapi/shared_impl/ppb_video_decoder_shared.cc
+++ b/ppapi/shared_impl/ppb_video_decoder_shared.cc
@@ -50,7 +50,7 @@ void PPB_VideoDecoder_Shared::Destroy() {
bool PPB_VideoDecoder_Shared::SetFlushCallback(
scoped_refptr<TrackedCallback> callback) {
- if (flush_callback_.get())
+ if (TrackedCallback::IsPending(flush_callback_))
return false;
flush_callback_ = callback;
return true;
@@ -72,11 +72,11 @@ bool PPB_VideoDecoder_Shared::SetBitstreamBufferCallback(
}
void PPB_VideoDecoder_Shared::RunFlushCallback(int32 result) {
- TrackedCallback::ClearAndRun(&flush_callback_, result);
+ flush_callback_->Run(result);
}
void PPB_VideoDecoder_Shared::RunResetCallback(int32 result) {
- TrackedCallback::ClearAndRun(&reset_callback_, result);
+ reset_callback_->Run(result);
}
void PPB_VideoDecoder_Shared::RunBitstreamBufferCallback(
« no previous file with comments | « ppapi/shared_impl/ppb_video_capture_shared.cc ('k') | ppapi/shared_impl/private/ppb_host_resolver_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698