| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 session_->Close(error); | 168 session_->Close(error); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void IceConnectionToHost::OnChannelInitialized( | 171 void IceConnectionToHost::OnChannelInitialized( |
| 172 ChannelDispatcherBase* channel_dispatcher) { | 172 ChannelDispatcherBase* channel_dispatcher) { |
| 173 NotifyIfChannelsReady(); | 173 NotifyIfChannelsReady(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void IceConnectionToHost::OnChannelClosed( | 176 void IceConnectionToHost::OnChannelClosed( |
| 177 ChannelDispatcherBase* channel_dispatcher) { | 177 ChannelDispatcherBase* channel_dispatcher) { |
| 178 // ICE transport doesn't close channels dynamically. | 178 session_->Close(OK); |
| 179 NOTREACHED(); | |
| 180 } | 179 } |
| 181 | 180 |
| 182 void IceConnectionToHost::OnVideoChannelStatus(bool active) { | 181 void IceConnectionToHost::OnVideoChannelStatus(bool active) { |
| 183 event_callback_->OnConnectionReady(active); | 182 event_callback_->OnConnectionReady(active); |
| 184 } | 183 } |
| 185 | 184 |
| 186 ConnectionToHost::State IceConnectionToHost::state() const { | 185 ConnectionToHost::State IceConnectionToHost::state() const { |
| 187 return state_; | 186 return state_; |
| 188 } | 187 } |
| 189 | 188 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 222 |
| 224 if (state != state_) { | 223 if (state != state_) { |
| 225 state_ = state; | 224 state_ = state; |
| 226 error_ = error; | 225 error_ = error; |
| 227 event_callback_->OnConnectionState(state_, error_); | 226 event_callback_->OnConnectionState(state_, error_); |
| 228 } | 227 } |
| 229 } | 228 } |
| 230 | 229 |
| 231 } // namespace protocol | 230 } // namespace protocol |
| 232 } // namespace remoting | 231 } // namespace remoting |
| OLD | NEW |