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

Unified Diff: remoting/protocol/fake_video_renderer.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/fake_video_renderer.h ('k') | remoting/protocol/frame_consumer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_video_renderer.cc
diff --git a/remoting/protocol/fake_video_renderer.cc b/remoting/protocol/fake_video_renderer.cc
index d30c4addbab027dedeaaf3c92a8dac2911056590..b0d9b97d35c53f25a48900ef8a7f6da36f081e5d 100644
--- a/remoting/protocol/fake_video_renderer.cc
+++ b/remoting/protocol/fake_video_renderer.cc
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "remoting/proto/video.pb.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
@@ -22,8 +23,9 @@ void FakeVideoStub::set_on_frame_callback(base::Closure on_frame_callback) {
on_frame_callback_ = on_frame_callback;
}
-void FakeVideoStub::ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
- const base::Closure& done) {
+void FakeVideoStub::ProcessVideoPacket(
+ std::unique_ptr<VideoPacket> video_packet,
+ const base::Closure& done) {
CHECK(thread_checker_.CalledOnValidThread());
received_packets_.push_back(std::move(video_packet));
if (!done.is_null())
@@ -40,13 +42,13 @@ void FakeFrameConsumer::set_on_frame_callback(base::Closure on_frame_callback) {
on_frame_callback_ = on_frame_callback;
}
-scoped_ptr<webrtc::DesktopFrame> FakeFrameConsumer::AllocateFrame(
+std::unique_ptr<webrtc::DesktopFrame> FakeFrameConsumer::AllocateFrame(
const webrtc::DesktopSize& size) {
CHECK(thread_checker_.CalledOnValidThread());
- return make_scoped_ptr(new webrtc::BasicDesktopFrame(size));
+ return base::WrapUnique(new webrtc::BasicDesktopFrame(size));
}
-void FakeFrameConsumer::DrawFrame(scoped_ptr<webrtc::DesktopFrame> frame,
+void FakeFrameConsumer::DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
const base::Closure& done) {
CHECK(thread_checker_.CalledOnValidThread());
received_frames_.push_back(std::move(frame));
« no previous file with comments | « remoting/protocol/fake_video_renderer.h ('k') | remoting/protocol/frame_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698