Update ppapi::proxy::PluginResource to work with OnceCallback
Update users of PluginResource to use base::BindOnce() instead of
base::Bind()
Bug: 1007816
Change-Id: Iecb9a3a2771849bf74b26f61b08bfe176ece5fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2764085
Reviewed-by: Raymes Khoury <[email protected]>
Commit-Queue: Anand K Mistry <[email protected]>
Cr-Commit-Position: refs/heads/master@{#863634}
diff --git a/ppapi/proxy/video_decoder_resource.cc b/ppapi/proxy/video_decoder_resource.cc
index 60020b5a..264e15d 100644
--- a/ppapi/proxy/video_decoder_resource.cc
+++ b/ppapi/proxy/video_decoder_resource.cc
@@ -164,9 +164,10 @@
Call<PpapiPluginMsg_VideoDecoder_InitializeReply>(
RENDERER,
- PpapiHostMsg_VideoDecoder_Initialize(
- host_resource, profile, acceleration, min_picture_count),
- base::Bind(&VideoDecoderResource::OnPluginMsgInitializeComplete, this));
+ PpapiHostMsg_VideoDecoder_Initialize(host_resource, profile, acceleration,
+ min_picture_count),
+ base::BindOnce(&VideoDecoderResource::OnPluginMsgInitializeComplete,
+ this));
return PP_OK_COMPLETIONPENDING;
}
@@ -252,9 +253,8 @@
memcpy(shm_buffer->addr, buffer, size);
Call<PpapiPluginMsg_VideoDecoder_DecodeReply>(
- RENDERER,
- PpapiHostMsg_VideoDecoder_Decode(shm_buffer->shm_id, size, uid),
- base::Bind(&VideoDecoderResource::OnPluginMsgDecodeComplete, this));
+ RENDERER, PpapiHostMsg_VideoDecoder_Decode(shm_buffer->shm_id, size, uid),
+ base::BindOnce(&VideoDecoderResource::OnPluginMsgDecodeComplete, this));
// If we have another free buffer, or we can still create new buffers, let
// the plugin call Decode again.
@@ -315,9 +315,8 @@
flush_callback_ = callback;
Call<PpapiPluginMsg_VideoDecoder_FlushReply>(
- RENDERER,
- PpapiHostMsg_VideoDecoder_Flush(),
- base::Bind(&VideoDecoderResource::OnPluginMsgFlushComplete, this));
+ RENDERER, PpapiHostMsg_VideoDecoder_Flush(),
+ base::BindOnce(&VideoDecoderResource::OnPluginMsgFlushComplete, this));
return PP_OK_COMPLETIONPENDING;
}
@@ -340,9 +339,8 @@
get_picture_callback_->PostAbort();
get_picture_callback_.reset();
Call<PpapiPluginMsg_VideoDecoder_ResetReply>(
- RENDERER,
- PpapiHostMsg_VideoDecoder_Reset(),
- base::Bind(&VideoDecoderResource::OnPluginMsgResetComplete, this));
+ RENDERER, PpapiHostMsg_VideoDecoder_Reset(),
+ base::BindOnce(&VideoDecoderResource::OnPluginMsgResetComplete, this));
return PP_OK_COMPLETIONPENDING;
}