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

Side by Side Diff: remoting/protocol/fake_desktop_capturer.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/protocol/connection_unittest.cc ('k') | remoting/protocol/video_frame_pump.h » ('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 "remoting/protocol/fake_desktop_capturer.h" 5 #include "remoting/protocol/fake_desktop_capturer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 void FakeDesktopCapturer::Capture(const webrtc::DesktopRegion& region) { 148 void FakeDesktopCapturer::Capture(const webrtc::DesktopRegion& region) {
149 base::Time capture_start_time = base::Time::Now(); 149 base::Time capture_start_time = base::Time::Now();
150 std::unique_ptr<webrtc::DesktopFrame> frame = 150 std::unique_ptr<webrtc::DesktopFrame> frame =
151 frame_generator_.Run(shared_memory_factory_.get()); 151 frame_generator_.Run(shared_memory_factory_.get());
152 if (frame) { 152 if (frame) {
153 frame->set_capture_time_ms( 153 frame->set_capture_time_ms(
154 (base::Time::Now() - capture_start_time).InMillisecondsRoundedUp()); 154 (base::Time::Now() - capture_start_time).InMillisecondsRoundedUp());
155 } 155 }
156 callback_->OnCaptureCompleted(frame.release()); 156 callback_->OnCaptureResult(
157 frame ? webrtc::DesktopCapturer::Result::SUCCESS
158 : webrtc::DesktopCapturer::Result::ERROR_TEMPORARY,
159 std::move(frame));
157 } 160 }
158 161
159 } // namespace protocol 162 } // namespace protocol
160 } // namespace remoting 163 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/video_frame_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698