OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_client.h" | 5 #include "remoting/protocol/connection_to_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "google/protobuf/message.h" | 10 #include "google/protobuf/message.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (control_connected_ && input_connected_ && video_connected_) | 155 if (control_connected_ && input_connected_ && video_connected_) |
156 handler_->OnConnectionOpened(this); | 156 handler_->OnConnectionOpened(this); |
157 } | 157 } |
158 | 158 |
159 void ConnectionToClient::CloseOnError() { | 159 void ConnectionToClient::CloseOnError() { |
160 CloseChannels(); | 160 CloseChannels(); |
161 handler_->OnConnectionFailed(this); | 161 handler_->OnConnectionFailed(this); |
162 } | 162 } |
163 | 163 |
164 void ConnectionToClient::CloseChannels() { | 164 void ConnectionToClient::CloseChannels() { |
165 if (video_writer_.get()) | 165 video_writer_.reset(); |
166 video_writer_->Close(); | 166 client_control_sender_.reset(); |
167 if (client_control_sender_.get()) | 167 dispatcher_.reset(); |
168 client_control_sender_->Close(); | |
169 } | 168 } |
170 | 169 |
171 } // namespace protocol | 170 } // namespace protocol |
172 } // namespace remoting | 171 } // namespace remoting |
OLD | NEW |