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/webrtc_connection_to_client.h" | 5 #include "remoting/protocol/webrtc_connection_to_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void WebrtcConnectionToClient::OnChannelInitialized( | 167 void WebrtcConnectionToClient::OnChannelInitialized( |
168 ChannelDispatcherBase* channel_dispatcher) { | 168 ChannelDispatcherBase* channel_dispatcher) { |
169 DCHECK(thread_checker_.CalledOnValidThread()); | 169 DCHECK(thread_checker_.CalledOnValidThread()); |
170 | 170 |
171 if (control_dispatcher_ && control_dispatcher_->is_connected() && | 171 if (control_dispatcher_ && control_dispatcher_->is_connected() && |
172 event_dispatcher_ && event_dispatcher_->is_connected()) { | 172 event_dispatcher_ && event_dispatcher_->is_connected()) { |
173 event_handler_->OnConnectionChannelsConnected(this); | 173 event_handler_->OnConnectionChannelsConnected(this); |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 void WebrtcConnectionToClient::OnChannelError( | |
178 ChannelDispatcherBase* channel_dispatcher, | |
179 ErrorCode error) { | |
180 DCHECK(thread_checker_.CalledOnValidThread()); | |
181 | |
182 LOG(ERROR) << "Failed to connect channel " | |
183 << channel_dispatcher->channel_name(); | |
184 Disconnect(error); | |
185 } | |
186 | |
187 } // namespace protocol | 177 } // namespace protocol |
188 } // namespace remoting | 178 } // namespace remoting |
OLD | NEW |