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/webrtc_connection_to_host.h" | 5 #include "remoting/protocol/webrtc_connection_to_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "jingle/glue/thread_wrapper.h" | 9 #include "jingle/glue/thread_wrapper.h" |
10 #include "remoting/protocol/client_control_dispatcher.h" | 10 #include "remoting/protocol/client_control_dispatcher.h" |
11 #include "remoting/protocol/client_event_dispatcher.h" | 11 #include "remoting/protocol/client_event_dispatcher.h" |
12 #include "remoting/protocol/client_stub.h" | 12 #include "remoting/protocol/client_stub.h" |
13 #include "remoting/protocol/clipboard_stub.h" | 13 #include "remoting/protocol/clipboard_stub.h" |
14 #include "remoting/protocol/transport_context.h" | 14 #include "remoting/protocol/transport_context.h" |
15 #include "remoting/protocol/video_renderer.h" | 15 #include "remoting/protocol/video_renderer.h" |
16 #include "remoting/protocol/webrtc_transport.h" | 16 #include "remoting/protocol/webrtc_transport.h" |
17 #include "remoting/protocol/webrtc_video_renderer_adapter.h" | 17 #include "remoting/protocol/webrtc_video_renderer_adapter.h" |
18 | 18 |
19 namespace remoting { | 19 namespace remoting { |
20 namespace protocol { | 20 namespace protocol { |
21 | 21 |
22 WebrtcConnectionToHost::WebrtcConnectionToHost() {} | 22 WebrtcConnectionToHost::WebrtcConnectionToHost() {} |
23 WebrtcConnectionToHost::~WebrtcConnectionToHost() {} | 23 WebrtcConnectionToHost::~WebrtcConnectionToHost() {} |
24 | 24 |
25 void WebrtcConnectionToHost::Connect( | 25 void WebrtcConnectionToHost::Connect( |
26 scoped_ptr<Session> session, | 26 std::unique_ptr<Session> session, |
27 scoped_refptr<TransportContext> transport_context, | 27 scoped_refptr<TransportContext> transport_context, |
28 HostEventCallback* event_callback) { | 28 HostEventCallback* event_callback) { |
29 DCHECK(client_stub_); | 29 DCHECK(client_stub_); |
30 DCHECK(clipboard_stub_); | 30 DCHECK(clipboard_stub_); |
31 | 31 |
32 transport_.reset(new WebrtcTransport( | 32 transport_.reset(new WebrtcTransport( |
33 jingle_glue::JingleThreadWrapper::current(), transport_context, this)); | 33 jingle_glue::JingleThreadWrapper::current(), transport_context, this)); |
34 | 34 |
35 session_ = std::move(session); | 35 session_ = std::move(session); |
36 session_->SetEventHandler(this); | 36 session_->SetEventHandler(this); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 if (state != state_) { | 169 if (state != state_) { |
170 state_ = state; | 170 state_ = state; |
171 error_ = error; | 171 error_ = error; |
172 event_callback_->OnConnectionState(state_, error_); | 172 event_callback_->OnConnectionState(state_, error_); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 } // namespace protocol | 176 } // namespace protocol |
177 } // namespace remoting | 177 } // namespace remoting |
OLD | NEW |