Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: remoting/protocol/ice_connection_to_host.cc

Issue 2757723002: Update ICE protocol to handle closed channel (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/protocol/ice_connection_to_client.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/ice_connection_to_client.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698