| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/location.h" | 9 #include "base/location.h" |
| 10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 | 154 |
| 155 void ConnectionToHost::OnSessionStateChange( | 155 void ConnectionToHost::OnSessionStateChange( |
| 156 Session::State state) { | 156 Session::State state) { |
| 157 DCHECK(CalledOnValidThread()); | 157 DCHECK(CalledOnValidThread()); |
| 158 DCHECK(event_callback_); | 158 DCHECK(event_callback_); |
| 159 | 159 |
| 160 switch (state) { | 160 switch (state) { |
| 161 case Session::INITIALIZING: | 161 case Session::INITIALIZING: |
| 162 case Session::CONNECTING: | 162 case Session::CONNECTING: |
| 163 case Session::ACCEPTING: |
| 163 case Session::CONNECTED: | 164 case Session::CONNECTED: |
| 164 // Don't care about these events. | 165 // Don't care about these events. |
| 165 break; | 166 break; |
| 166 | 167 |
| 167 case Session::AUTHENTICATED: | 168 case Session::AUTHENTICATED: |
| 168 control_dispatcher_.reset(new ClientControlDispatcher()); | 169 control_dispatcher_.reset(new ClientControlDispatcher()); |
| 169 control_dispatcher_->Init( | 170 control_dispatcher_->Init( |
| 170 session_.get(), session_->config().control_config(), | 171 session_.get(), session_->config().control_config(), |
| 171 base::Bind(&ConnectionToHost::OnChannelInitialized, | 172 base::Bind(&ConnectionToHost::OnChannelInitialized, |
| 172 base::Unretained(this))); | 173 base::Unretained(this))); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 288 |
| 288 if (state != state_) { | 289 if (state != state_) { |
| 289 state_ = state; | 290 state_ = state; |
| 290 error_ = error; | 291 error_ = error; |
| 291 event_callback_->OnConnectionState(state_, error_); | 292 event_callback_->OnConnectionState(state_, error_); |
| 292 } | 293 } |
| 293 } | 294 } |
| 294 | 295 |
| 295 } // namespace protocol | 296 } // namespace protocol |
| 296 } // namespace remoting | 297 } // namespace remoting |
| OLD | NEW |