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

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

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 "remoting/protocol/session.h" 7 #include "remoting/protocol/session.h"
8 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" 8 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
9 9
10 namespace remoting { 10 namespace remoting {
(...skipping 12 matching lines...) Expand all
23 23
24 void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) { 24 void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) {
25 size_callback_ = size_callback; 25 size_callback_ = size_callback;
26 } 26 }
27 27
28 base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() { 28 base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() {
29 return weak_factory_.GetWeakPtr(); 29 return weak_factory_.GetWeakPtr();
30 } 30 }
31 31
32 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session) 32 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session)
33 : session_(session.Pass()) {} 33 : session_(std::move(session)) {}
34 34
35 FakeConnectionToClient::~FakeConnectionToClient() {} 35 FakeConnectionToClient::~FakeConnectionToClient() {}
36 36
37 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) { 37 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) {
38 event_handler_ = event_handler; 38 event_handler_ = event_handler;
39 } 39 }
40 40
41 scoped_ptr<VideoStream> FakeConnectionToClient::StartVideoStream( 41 scoped_ptr<VideoStream> FakeConnectionToClient::StartVideoStream(
42 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) { 42 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) {
43 scoped_ptr<FakeVideoStream> result(new FakeVideoStream()); 43 scoped_ptr<FakeVideoStream> result(new FakeVideoStream());
44 last_video_stream_ = result->GetWeakPtr(); 44 last_video_stream_ = result->GetWeakPtr();
45 return result.Pass(); 45 return std::move(result);
46 } 46 }
47 47
48 AudioStub* FakeConnectionToClient::audio_stub() { 48 AudioStub* FakeConnectionToClient::audio_stub() {
49 return audio_stub_; 49 return audio_stub_;
50 } 50 }
51 51
52 ClientStub* FakeConnectionToClient::client_stub() { 52 ClientStub* FakeConnectionToClient::client_stub() {
53 return client_stub_; 53 return client_stub_;
54 } 54 }
55 55
(...skipping 19 matching lines...) Expand all
75 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) { 75 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) {
76 host_stub_ = host_stub; 76 host_stub_ = host_stub;
77 } 77 }
78 78
79 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) { 79 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
80 input_stub_ = input_stub; 80 input_stub_ = input_stub;
81 } 81 }
82 82
83 } // namespace protocol 83 } // namespace protocol
84 } // namespace remoting 84 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698