OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/connection_to_host.h" | 5 #include "remoting/protocol/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/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 port_allocator_session_factory_.release()); | 116 port_allocator_session_factory_.release()); |
117 | 117 |
118 // TODO(ajwong): Make this a command switch when we're more stable. | 118 // TODO(ajwong): Make this a command switch when we're more stable. |
119 session_manager->set_allow_local_ips(true); | 119 session_manager->set_allow_local_ips(true); |
120 | 120 |
121 session_manager_.reset(session_manager); | 121 session_manager_.reset(session_manager); |
122 session_manager_->Init( | 122 session_manager_->Init( |
123 local_jid_, signal_strategy_.get(), this, NULL, "", allow_nat_traversal_); | 123 local_jid_, signal_strategy_.get(), this, NULL, "", allow_nat_traversal_); |
124 } | 124 } |
125 | 125 |
126 const SessionConfig* ConnectionToHost::config() { | 126 const SessionConfig& ConnectionToHost::config() { |
127 return session_->config(); | 127 return session_->config(); |
128 } | 128 } |
129 | 129 |
130 void ConnectionToHost::OnStateChange( | 130 void ConnectionToHost::OnStateChange( |
131 SignalStrategy::StatusObserver::State state) { | 131 SignalStrategy::StatusObserver::State state) { |
132 DCHECK(message_loop_->BelongsToCurrentThread()); | 132 DCHECK(message_loop_->BelongsToCurrentThread()); |
133 DCHECK(event_callback_); | 133 DCHECK(event_callback_); |
134 | 134 |
135 if (state == SignalStrategy::StatusObserver::CONNECTED) { | 135 if (state == SignalStrategy::StatusObserver::CONNECTED) { |
136 VLOG(1) << "Connected as: " << local_jid_; | 136 VLOG(1) << "Connected as: " << local_jid_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 input_sender_.reset( | 255 input_sender_.reset( |
256 new InputSender(message_loop_, session_->event_channel())); | 256 new InputSender(message_loop_, session_->event_channel())); |
257 } | 257 } |
258 | 258 |
259 ConnectionToHost::State ConnectionToHost::state() const { | 259 ConnectionToHost::State ConnectionToHost::state() const { |
260 return state_; | 260 return state_; |
261 } | 261 } |
262 | 262 |
263 } // namespace protocol | 263 } // namespace protocol |
264 } // namespace remoting | 264 } // namespace remoting |
OLD | NEW |