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

Side by Side Diff: remoting/protocol/connection_unittest.cc

Issue 2050353002: Update webrtc::DesktopCapturer clients to implement OnCaptureResult(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromeos Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « remoting/host/ipc_video_frame_capturer.cc ('k') | remoting/protocol/fake_desktop_capturer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 memset(frame->data(), 0, frame->stride() * frame->size().height()); 77 memset(frame->data(), 0, frame->stride() * frame->size().height());
78 78
79 // Set updated_region only for the first frame, as the frame content 79 // Set updated_region only for the first frame, as the frame content
80 // doesn't change. 80 // doesn't change.
81 if (!first_frame_sent_) { 81 if (!first_frame_sent_) {
82 first_frame_sent_ = true; 82 first_frame_sent_ = true;
83 frame->mutable_updated_region()->SetRect( 83 frame->mutable_updated_region()->SetRect(
84 webrtc::DesktopRect::MakeSize(frame->size())); 84 webrtc::DesktopRect::MakeSize(frame->size()));
85 } 85 }
86 86
87 callback_->OnCaptureCompleted(frame.release()); 87 callback_->OnCaptureResult(webrtc::DesktopCapturer::Result::SUCCESS,
88 std::move(frame));
88 } 89 }
89 90
90 private: 91 private:
91 Callback* callback_ = nullptr; 92 Callback* callback_ = nullptr;
92 bool first_frame_sent_ = false; 93 bool first_frame_sent_ = false;
93 }; 94 };
94 95
95 } // namespace 96 } // namespace
96 97
97 class ConnectionTest : public testing::Test, 98 class ConnectionTest : public testing::Test,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 338
338 std::unique_ptr<VideoStream> video_stream = 339 std::unique_ptr<VideoStream> video_stream =
339 host_connection_->StartVideoStream( 340 host_connection_->StartVideoStream(
340 base::WrapUnique(new TestScreenCapturer())); 341 base::WrapUnique(new TestScreenCapturer()));
341 342
342 WaitFirstVideoFrame(); 343 WaitFirstVideoFrame();
343 } 344 }
344 345
345 } // namespace protocol 346 } // namespace protocol
346 } // namespace remoting 347 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_video_frame_capturer.cc ('k') | remoting/protocol/fake_desktop_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698