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

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

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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
diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
index 4874998bb38ffddff8e0e2945e2bab1800c2a7ec..8276ecc46b4dca4bd296e48889abb75098ef2e1c 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
@@ -53,11 +53,7 @@ PPB_VideoDecoder_API* PPB_VideoDecoder_Impl::AsPPB_VideoDecoder_API() {
int32_t PPB_VideoDecoder_Impl::Initialize(
PP_Resource context_id,
- const PP_VideoConfigElement* decoder_config,
- PP_CompletionCallback callback) {
- if (!callback.func)
- return PP_ERROR_BADARGUMENT;
-
+ const PP_VideoConfigElement* decoder_config) {
if (!instance())
return PP_ERROR_FAILED;
@@ -98,8 +94,7 @@ int32_t PPB_VideoDecoder_Impl::Initialize(
FlushCommandBuffer();
if (platform_video_decoder_->Initialize(copied)) {
- initialization_callback_ = callback;
- return PP_OK_COMPLETIONPENDING;
+ return PP_OK;
} else {
return PP_ERROR_FAILED;
}
@@ -276,10 +271,7 @@ void PPB_VideoDecoder_Impl::NotifyFlushDone() {
}
void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
- if (initialization_callback_.func == NULL)
- return;
-
- PP_RunAndClearCompletionCallback(&initialization_callback_, PP_OK);
+ NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
}
void PPB_VideoDecoder_Impl::FlushCommandBuffer() {
« ppapi/c/dev/ppb_video_decoder_dev.h ('K') | « webkit/plugins/ppapi/ppb_video_decoder_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698