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

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

Issue 2254673002: Remove dependency on AudioStub in ConnectionToClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/codec/video_encoder.h" 9 #include "remoting/codec/video_encoder.h"
10 #include "remoting/protocol/audio_send_stream.h"
10 #include "remoting/protocol/session.h" 11 #include "remoting/protocol/session.h"
11 #include "remoting/protocol/video_frame_pump.h" 12 #include "remoting/protocol/video_frame_pump.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" 13 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
13 14
14 namespace remoting { 15 namespace remoting {
15 namespace protocol { 16 namespace protocol {
16 17
17 FakeVideoStream::FakeVideoStream() : weak_factory_(this) {} 18 FakeVideoStream::FakeVideoStream() : weak_factory_(this) {}
18 FakeVideoStream::~FakeVideoStream() {} 19 FakeVideoStream::~FakeVideoStream() {}
19 20
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 video_stub_)); 56 video_stub_));
56 video_feedback_stub_ = pump->video_feedback_stub(); 57 video_feedback_stub_ = pump->video_feedback_stub();
57 return std::move(pump); 58 return std::move(pump);
58 } 59 }
59 60
60 std::unique_ptr<FakeVideoStream> result(new FakeVideoStream()); 61 std::unique_ptr<FakeVideoStream> result(new FakeVideoStream());
61 last_video_stream_ = result->GetWeakPtr(); 62 last_video_stream_ = result->GetWeakPtr();
62 return std::move(result); 63 return std::move(result);
63 } 64 }
64 65
65 AudioStub* FakeConnectionToClient::audio_stub() { 66 std::unique_ptr<AudioSendStream> FakeConnectionToClient::StartAudioStream(
66 return audio_stub_; 67 std::unique_ptr<AudioSource> audio_source) {
68 NOTIMPLEMENTED();
69 return nullptr;
67 } 70 }
68 71
69 ClientStub* FakeConnectionToClient::client_stub() { 72 ClientStub* FakeConnectionToClient::client_stub() {
70 return client_stub_; 73 return client_stub_;
71 } 74 }
72 75
73 void FakeConnectionToClient::Disconnect(ErrorCode disconnect_error) { 76 void FakeConnectionToClient::Disconnect(ErrorCode disconnect_error) {
74 CHECK(is_connected_); 77 CHECK(is_connected_);
75 78
76 is_connected_ = false; 79 is_connected_ = false;
(...skipping 15 matching lines...) Expand all
92 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) { 95 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) {
93 host_stub_ = host_stub; 96 host_stub_ = host_stub;
94 } 97 }
95 98
96 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) { 99 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
97 input_stub_ = input_stub; 100 input_stub_ = input_stub;
98 } 101 }
99 102
100 } // namespace protocol 103 } // namespace protocol
101 } // namespace remoting 104 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698