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

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

Issue 1472873005: Add VideoStream interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_video_pump
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 9
9 namespace remoting { 10 namespace remoting {
10 namespace protocol { 11 namespace protocol {
11 12
13 FakeVideoStream::FakeVideoStream() : weak_factory_(this) {}
14 FakeVideoStream::~FakeVideoStream() {}
15
16 void FakeVideoStream::Pause(bool pause) {}
17
18 void FakeVideoStream::OnInputEventReceived(int64_t event_timestamp) {}
19
20 void FakeVideoStream::SetLosslessEncode(bool want_lossless) {}
21
22 void FakeVideoStream::SetLosslessColor(bool want_lossless) {}
23
24 void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) {
25 size_callback_ = size_callback;
26 }
27
28 base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() {
29 return weak_factory_.GetWeakPtr();
30 }
31
12 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session) 32 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session)
13 : session_(session.Pass()) {} 33 : session_(session.Pass()) {}
14 34
15 FakeConnectionToClient::~FakeConnectionToClient() {} 35 FakeConnectionToClient::~FakeConnectionToClient() {}
16 36
17 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) { 37 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) {
18 event_handler_ = event_handler; 38 event_handler_ = event_handler;
19 } 39 }
20 40
21 VideoStub* FakeConnectionToClient::video_stub() { 41 scoped_ptr<VideoStream> FakeConnectionToClient::StartVideoStream(
22 return video_stub_; 42 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) {
43 scoped_ptr<FakeVideoStream> result(new FakeVideoStream());
44 last_video_stream_ = result->GetWeakPtr();
45 return result.Pass();
23 } 46 }
24 47
25 AudioStub* FakeConnectionToClient::audio_stub() { 48 AudioStub* FakeConnectionToClient::audio_stub() {
26 return audio_stub_; 49 return audio_stub_;
27 } 50 }
28 51
29 ClientStub* FakeConnectionToClient::client_stub() { 52 ClientStub* FakeConnectionToClient::client_stub() {
30 return client_stub_; 53 return client_stub_;
31 } 54 }
32 55
(...skipping 17 matching lines...) Expand all
50 } 73 }
51 74
52 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) { 75 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) {
53 host_stub_ = host_stub; 76 host_stub_ = host_stub;
54 } 77 }
55 78
56 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) { 79 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
57 input_stub_ = input_stub; 80 input_stub_ = input_stub;
58 } 81 }
59 82
60 void FakeConnectionToClient::set_video_feedback_stub(
61 VideoFeedbackStub* video_feedback_stub) {
62 video_feedback_stub_ = video_feedback_stub;
63 }
64
65 } // namespace protocol 83 } // namespace protocol
66 } // namespace remoting 84 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_connection_to_client.h ('k') | remoting/protocol/ice_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698