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/ice_connection_to_host.h" | 5 #include "remoting/protocol/ice_connection_to_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "remoting/protocol/transport_context.h" | 23 #include "remoting/protocol/transport_context.h" |
24 #include "remoting/protocol/video_renderer.h" | 24 #include "remoting/protocol/video_renderer.h" |
25 | 25 |
26 namespace remoting { | 26 namespace remoting { |
27 namespace protocol { | 27 namespace protocol { |
28 | 28 |
29 IceConnectionToHost::IceConnectionToHost() {} | 29 IceConnectionToHost::IceConnectionToHost() {} |
30 IceConnectionToHost::~IceConnectionToHost() {} | 30 IceConnectionToHost::~IceConnectionToHost() {} |
31 | 31 |
32 void IceConnectionToHost::Connect( | 32 void IceConnectionToHost::Connect( |
33 scoped_ptr<Session> session, | 33 std::unique_ptr<Session> session, |
34 scoped_refptr<TransportContext> transport_context, | 34 scoped_refptr<TransportContext> transport_context, |
35 HostEventCallback* event_callback) { | 35 HostEventCallback* event_callback) { |
36 DCHECK(client_stub_); | 36 DCHECK(client_stub_); |
37 DCHECK(clipboard_stub_); | 37 DCHECK(clipboard_stub_); |
38 DCHECK(video_renderer_); | 38 DCHECK(video_renderer_); |
39 | 39 |
40 transport_.reset(new IceTransport(transport_context, this)); | 40 transport_.reset(new IceTransport(transport_context, this)); |
41 | 41 |
42 session_ = std::move(session); | 42 session_ = std::move(session); |
43 session_->SetEventHandler(this); | 43 session_->SetEventHandler(this); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 if (state != state_) { | 213 if (state != state_) { |
214 state_ = state; | 214 state_ = state; |
215 error_ = error; | 215 error_ = error; |
216 event_callback_->OnConnectionState(state_, error_); | 216 event_callback_->OnConnectionState(state_, error_); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 } // namespace protocol | 220 } // namespace protocol |
221 } // namespace remoting | 221 } // namespace remoting |
OLD | NEW |