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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 IceConnectionToHost::IceConnectionToHost() {} | 27 IceConnectionToHost::IceConnectionToHost() {} |
28 IceConnectionToHost::~IceConnectionToHost() {} | 28 IceConnectionToHost::~IceConnectionToHost() {} |
29 | 29 |
30 void IceConnectionToHost::Connect(scoped_ptr<Session> session, | 30 void IceConnectionToHost::Connect(scoped_ptr<Session> session, |
31 HostEventCallback* event_callback) { | 31 HostEventCallback* event_callback) { |
32 DCHECK(client_stub_); | 32 DCHECK(client_stub_); |
33 DCHECK(clipboard_stub_); | 33 DCHECK(clipboard_stub_); |
34 DCHECK(monitored_video_stub_); | 34 DCHECK(monitored_video_stub_); |
35 | 35 |
36 session_ = session.Pass(); | 36 session_ = std::move(session); |
37 session_->SetEventHandler(this); | 37 session_->SetEventHandler(this); |
38 | 38 |
39 event_callback_ = event_callback; | 39 event_callback_ = event_callback; |
40 | 40 |
41 SetState(CONNECTING, OK); | 41 SetState(CONNECTING, OK); |
42 } | 42 } |
43 | 43 |
44 const SessionConfig& IceConnectionToHost::config() { | 44 const SessionConfig& IceConnectionToHost::config() { |
45 return session_->config(); | 45 return session_->config(); |
46 } | 46 } |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 209 |
210 if (state != state_) { | 210 if (state != state_) { |
211 state_ = state; | 211 state_ = state; |
212 error_ = error; | 212 error_ = error; |
213 event_callback_->OnConnectionState(state_, error_); | 213 event_callback_->OnConnectionState(state_, error_); |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 } // namespace protocol | 217 } // namespace protocol |
218 } // namespace remoting | 218 } // namespace remoting |
OLD | NEW |