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

Unified Diff: remoting/client/plugin/pepper_view.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 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
« no previous file with comments | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/plugin/pepper_view_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index fa20c06a64b86c29e62544f04b7a8ade5bd9f615..3d6a71d17777589bd97eae7b7b0dc31d3001c980 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -6,6 +6,7 @@
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/image_data.h"
#include "ppapi/cpp/point.h"
@@ -309,21 +310,16 @@ double PepperView::GetVerticalScaleRatio() const {
}
void PepperView::AllocateFrame(media::VideoFrame::Format format,
- size_t width,
- size_t height,
- base::TimeDelta timestamp,
- base::TimeDelta duration,
+ const SkISize& size,
scoped_refptr<media::VideoFrame>* frame_out,
- Task* done) {
+ const base::Closure& done) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
- *frame_out = media::VideoFrame::CreateFrame(media::VideoFrame::RGB32,
- width, height,
- base::TimeDelta(),
- base::TimeDelta());
+ *frame_out = media::VideoFrame::CreateFrame(
+ media::VideoFrame::RGB32, size.width(), size.height(),
+ base::TimeDelta(), base::TimeDelta());
(*frame_out)->AddRef();
- done->Run();
- delete done;
+ done.Run();
}
void PepperView::ReleaseFrame(media::VideoFrame* frame) {
@@ -335,14 +331,13 @@ void PepperView::ReleaseFrame(media::VideoFrame* frame) {
void PepperView::OnPartialFrameOutput(media::VideoFrame* frame,
RectVector* rects,
- Task* done) {
+ const base::Closure& done) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
// TODO(ajwong): Clean up this API to be async so we don't need to use a
// member variable as a hack.
PaintFrame(frame, rects);
- done->Run();
- delete done;
+ done.Run();
}
void PepperView::OnPaintDone(base::Time paint_start) {
« no previous file with comments | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/plugin/pepper_view_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698