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

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

Issue 2146213002: Add support for dynamic channels in WebrtcTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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_host.h ('k') | remoting/protocol/message_pipe.h » ('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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 void IceConnectionToHost::OnIceTransportError(ErrorCode error) { 162 void IceConnectionToHost::OnIceTransportError(ErrorCode error) {
163 session_->Close(error); 163 session_->Close(error);
164 } 164 }
165 165
166 void IceConnectionToHost::OnChannelInitialized( 166 void IceConnectionToHost::OnChannelInitialized(
167 ChannelDispatcherBase* channel_dispatcher) { 167 ChannelDispatcherBase* channel_dispatcher) {
168 NotifyIfChannelsReady(); 168 NotifyIfChannelsReady();
169 } 169 }
170 170
171 void IceConnectionToHost::OnChannelClosed(
172 ChannelDispatcherBase* channel_dispatcher) {
173 // ICE transport doesn't close channels dynamically.
174 NOTREACHED();
175 }
176
171 void IceConnectionToHost::OnVideoChannelStatus(bool active) { 177 void IceConnectionToHost::OnVideoChannelStatus(bool active) {
172 event_callback_->OnConnectionReady(active); 178 event_callback_->OnConnectionReady(active);
173 } 179 }
174 180
175 ConnectionToHost::State IceConnectionToHost::state() const { 181 ConnectionToHost::State IceConnectionToHost::state() const {
176 return state_; 182 return state_;
177 } 183 }
178 184
179 void IceConnectionToHost::NotifyIfChannelsReady() { 185 void IceConnectionToHost::NotifyIfChannelsReady() {
180 if (!control_dispatcher_.get() || !control_dispatcher_->is_connected()) 186 if (!control_dispatcher_.get() || !control_dispatcher_->is_connected())
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 218
213 if (state != state_) { 219 if (state != state_) {
214 state_ = state; 220 state_ = state;
215 error_ = error; 221 error_ = error;
216 event_callback_->OnConnectionState(state_, error_); 222 event_callback_->OnConnectionState(state_, error_);
217 } 223 }
218 } 224 }
219 225
220 } // namespace protocol 226 } // namespace protocol
221 } // namespace remoting 227 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/ice_connection_to_host.h ('k') | remoting/protocol/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698