Index: webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc |
diff --git a/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc |
index 9e89439b6fd233ba590538f1207ac34301e38bf4..6652a1af71e1125e02bfca000539cbdf2a45e971 100644 |
--- a/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc |
+++ b/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc |
@@ -78,17 +78,15 @@ |
void Start(Callback* callback) override { callback_ = callback; } |
void Capture(const DesktopRegion& region) override { |
- callback_->OnCaptureResult( |
- next_frame_ ? Result::SUCCESS : Result::ERROR_TEMPORARY, |
- std::move(next_frame_)); |
- } |
- |
- void SetNextFrame(std::unique_ptr<DesktopFrame> next_frame) { |
- next_frame_ = std::move(next_frame); |
+ callback_->OnCaptureCompleted(next_frame_.release()); |
+ } |
+ |
+ void SetNextFrame(DesktopFrame* next_frame) { |
+ next_frame_.reset(next_frame); |
} |
private: |
- Callback* callback_ = nullptr; |
+ Callback* callback_; |
std::unique_ptr<DesktopFrame> next_frame_; |
}; |
@@ -167,13 +165,11 @@ |
DesktopAndCursorComposerTest() |
: fake_screen_(new FakeScreenCapturer()), |
fake_cursor_(new FakeMouseMonitor()), |
- blender_(fake_screen_, fake_cursor_) {} |
+ blender_(fake_screen_, fake_cursor_) { |
+ } |
// DesktopCapturer::Callback interface |
- void OnCaptureResult(DesktopCapturer::Result result, |
- std::unique_ptr<DesktopFrame> frame) override { |
- frame_ = std::move(frame); |
- } |
+ void OnCaptureCompleted(DesktopFrame* frame) override { frame_.reset(frame); } |
protected: |
// Owned by |blender_|. |
@@ -191,7 +187,7 @@ |
fake_cursor_->SetHotspot(DesktopVector()); |
fake_cursor_->SetState(MouseCursorMonitor::INSIDE, DesktopVector()); |
- fake_screen_->SetNextFrame(nullptr); |
+ fake_screen_->SetNextFrame(NULL); |
blender_.Capture(DesktopRegion()); |