OLD | NEW |
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_host.h" | 5 #include "remoting/protocol/fake_connection_to_host.h" |
6 | 6 |
7 #include "remoting/protocol/authenticator.h" | 7 #include "remoting/protocol/authenticator.h" |
8 #include "remoting/protocol/transport_context.h" | 8 #include "remoting/protocol/transport_context.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 FakeConnectionToHost::FakeConnectionToHost() | 13 FakeConnectionToHost::FakeConnectionToHost() |
14 : session_config_(protocol::SessionConfig::ForTest()) {} | 14 : session_config_(protocol::SessionConfig::ForTest()) {} |
15 FakeConnectionToHost::~FakeConnectionToHost() {} | 15 FakeConnectionToHost::~FakeConnectionToHost() {} |
16 | 16 |
17 void FakeConnectionToHost::set_client_stub(protocol::ClientStub* client_stub) {} | 17 void FakeConnectionToHost::set_client_stub(protocol::ClientStub* client_stub) {} |
18 | 18 |
19 void FakeConnectionToHost::set_clipboard_stub( | 19 void FakeConnectionToHost::set_clipboard_stub( |
20 protocol::ClipboardStub* clipboard_stub) {} | 20 protocol::ClipboardStub* clipboard_stub) {} |
21 | 21 |
22 void FakeConnectionToHost::set_video_renderer( | 22 void FakeConnectionToHost::set_video_renderer( |
23 protocol::VideoRenderer* video_renderer) {} | 23 protocol::VideoRenderer* video_renderer) {} |
24 | 24 |
25 void FakeConnectionToHost::set_audio_stub(protocol::AudioStub* audio_stub) {} | 25 void FakeConnectionToHost::InitializeAudio( |
| 26 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, |
| 27 base::WeakPtr<protocol::AudioStub> audio_stub) {} |
26 | 28 |
27 void FakeConnectionToHost::Connect( | 29 void FakeConnectionToHost::Connect( |
28 std::unique_ptr<protocol::Session> session, | 30 std::unique_ptr<protocol::Session> session, |
29 scoped_refptr<protocol::TransportContext> transport_context, | 31 scoped_refptr<protocol::TransportContext> transport_context, |
30 HostEventCallback* event_callback) { | 32 HostEventCallback* event_callback) { |
31 DCHECK(event_callback); | 33 DCHECK(event_callback); |
32 | 34 |
33 event_callback_ = event_callback; | 35 event_callback_ = event_callback; |
34 | 36 |
35 SetState(CONNECTING, protocol::OK); | 37 SetState(CONNECTING, protocol::OK); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 DCHECK(state == FAILED || error == protocol::OK); | 99 DCHECK(state == FAILED || error == protocol::OK); |
98 | 100 |
99 if (state != state_) { | 101 if (state != state_) { |
100 state_ = state; | 102 state_ = state; |
101 event_callback_->OnConnectionState(state_, error); | 103 event_callback_->OnConnectionState(state_, error); |
102 } | 104 } |
103 } | 105 } |
104 | 106 |
105 } // namespace test | 107 } // namespace test |
106 } // namespace remoting | 108 } // namespace remoting |
OLD | NEW |