Chromium Code Reviews| Index: remoting/protocol/connection_to_host.cc |
| diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc |
| index 03f388ce0ab2fe9ece333ce048589157e1c76dbe..6b7c5c7b9ba8ba46b96171433c69ac8b32327d9b 100644 |
| --- a/remoting/protocol/connection_to_host.cc |
| +++ b/remoting/protocol/connection_to_host.cc |
| @@ -44,11 +44,11 @@ ConnectionToHost::~ConnectionToHost() { |
| } |
| InputStub* ConnectionToHost::input_stub() { |
| - return input_stub_.get(); |
| + return input_sender_.get(); |
| } |
| HostStub* ConnectionToHost::host_stub() { |
| - return host_stub_.get(); |
| + return host_control_sender_.get(); |
| } |
| void ConnectionToHost::Connect(scoped_refptr<XmppProxy> xmpp_proxy, |
| @@ -84,6 +84,12 @@ void ConnectionToHost::Disconnect(const base::Closure& shutdown_task) { |
| return; |
| } |
| + if (input_sender_.get()) |
| + input_sender_->Close(); |
| + |
| + if (host_control_sender_.get()) |
| + host_control_sender_->Close(); |
|
Wez
2011/06/30 18:27:31
Same as ConnectionToClient.
Sergey Ulanov
2011/06/30 20:55:24
Done.
|
| + |
| if (session_) { |
| session_->Close( |
| NewRunnableMethod(this, &ConnectionToHost::OnDisconnected, |
| @@ -200,7 +206,8 @@ void ConnectionToHost::OnSessionStateChange( |
| // Initialize reader and writer. |
| video_reader_.reset(VideoReader::Create(session_->config())); |
| video_reader_->Init(session_, video_stub_); |
| - host_stub_.reset(new HostControlSender(session_->control_channel())); |
| + host_control_sender_.reset( |
| + new HostControlSender(session_->control_channel())); |
| dispatcher_->Initialize(session_.get(), client_stub_); |
| event_callback_->OnConnectionOpened(this); |
| break; |
| @@ -217,7 +224,7 @@ void ConnectionToHost::OnClientAuthenticated() { |
| state_ = STATE_AUTHENTICATED; |
| // Create and enable the input stub now that we're authenticated. |
| - input_stub_.reset(new InputSender(session_->event_channel())); |
| + input_sender_.reset(new InputSender(session_->event_channel())); |
| } |
| ConnectionToHost::State ConnectionToHost::state() const { |