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

Side by Side Diff: remoting/protocol/fake_connection_to_client.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 unified diff | Download patch
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_connection_to_client.h" 5 #include "remoting/protocol/fake_connection_to_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "remoting/protocol/session.h" 9 #include "remoting/protocol/session.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
(...skipping 13 matching lines...) Expand all
24 void FakeVideoStream::SetLosslessColor(bool want_lossless) {} 24 void FakeVideoStream::SetLosslessColor(bool want_lossless) {}
25 25
26 void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) { 26 void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) {
27 size_callback_ = size_callback; 27 size_callback_ = size_callback;
28 } 28 }
29 29
30 base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() { 30 base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() {
31 return weak_factory_.GetWeakPtr(); 31 return weak_factory_.GetWeakPtr();
32 } 32 }
33 33
34 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session) 34 FakeConnectionToClient::FakeConnectionToClient(std::unique_ptr<Session> session)
35 : session_(std::move(session)) {} 35 : session_(std::move(session)) {}
36 36
37 FakeConnectionToClient::~FakeConnectionToClient() {} 37 FakeConnectionToClient::~FakeConnectionToClient() {}
38 38
39 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) { 39 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) {
40 event_handler_ = event_handler; 40 event_handler_ = event_handler;
41 } 41 }
42 42
43 scoped_ptr<VideoStream> FakeConnectionToClient::StartVideoStream( 43 std::unique_ptr<VideoStream> FakeConnectionToClient::StartVideoStream(
44 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) { 44 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) {
45 scoped_ptr<FakeVideoStream> result(new FakeVideoStream()); 45 std::unique_ptr<FakeVideoStream> result(new FakeVideoStream());
46 last_video_stream_ = result->GetWeakPtr(); 46 last_video_stream_ = result->GetWeakPtr();
47 return std::move(result); 47 return std::move(result);
48 } 48 }
49 49
50 AudioStub* FakeConnectionToClient::audio_stub() { 50 AudioStub* FakeConnectionToClient::audio_stub() {
51 return audio_stub_; 51 return audio_stub_;
52 } 52 }
53 53
54 ClientStub* FakeConnectionToClient::client_stub() { 54 ClientStub* FakeConnectionToClient::client_stub() {
55 return client_stub_; 55 return client_stub_;
(...skipping 21 matching lines...) Expand all
77 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) { 77 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) {
78 host_stub_ = host_stub; 78 host_stub_ = host_stub;
79 } 79 }
80 80
81 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) { 81 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
82 input_stub_ = input_stub; 82 input_stub_ = input_stub;
83 } 83 }
84 84
85 } // namespace protocol 85 } // namespace protocol
86 } // namespace remoting 86 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_connection_to_client.h ('k') | remoting/protocol/fake_connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698