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

Unified Diff: remoting/host/video_frame_capturer_fake.cc

Issue 11363128: Converted VideoFrameCapturer callbacks into a VideoFrameCapturer::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More Mac compilation issues. 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
« no previous file with comments | « remoting/host/video_frame_capturer_fake.h ('k') | remoting/host/video_frame_capturer_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_frame_capturer_fake.cc
diff --git a/remoting/host/video_frame_capturer_fake.cc b/remoting/host/video_frame_capturer_fake.cc
index aff8f3ea3000a1c00ab238f236a86fe03c21c9ea..6d34fa2df421d953fe2313e78ae773713f340ad5 100644
--- a/remoting/host/video_frame_capturer_fake.cc
+++ b/remoting/host/video_frame_capturer_fake.cc
@@ -39,7 +39,8 @@ VideoFrameCapturerFake::VideoFrameCapturerFake()
VideoFrameCapturerFake::~VideoFrameCapturerFake() {
}
-void VideoFrameCapturerFake::Start(const CursorShapeChangedCallback& callback) {
+void VideoFrameCapturerFake::Start(Delegate* delegate) {
+ delegate_ = delegate;
}
void VideoFrameCapturerFake::Stop() {
@@ -53,8 +54,7 @@ void VideoFrameCapturerFake::InvalidateRegion(const SkRegion& invalid_region) {
helper_.InvalidateRegion(invalid_region);
}
-void VideoFrameCapturerFake::CaptureInvalidRegion(
- const CaptureCompletedCallback& callback) {
+void VideoFrameCapturerFake::CaptureInvalidRegion() {
GenerateImage();
helper_.InvalidateScreen(size_);
@@ -73,7 +73,7 @@ void VideoFrameCapturerFake::CaptureInvalidRegion(
helper_.set_size_most_recent(capture_data->size());
- callback.Run(capture_data);
+ delegate_->OnCaptureCompleted(capture_data);
}
const SkISize& VideoFrameCapturerFake::size_most_recent() const {
« no previous file with comments | « remoting/host/video_frame_capturer_fake.h ('k') | remoting/host/video_frame_capturer_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698