| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 DCHECK(CalledOnValidThread()); | 105 DCHECK(CalledOnValidThread()); |
| 106 | 106 |
| 107 DCHECK(handler_); | 107 DCHECK(handler_); |
| 108 switch(state) { | 108 switch(state) { |
| 109 case Session::INITIALIZING: | 109 case Session::INITIALIZING: |
| 110 case Session::CONNECTING: | 110 case Session::CONNECTING: |
| 111 case Session::ACCEPTING: | 111 case Session::ACCEPTING: |
| 112 case Session::CONNECTED: | 112 case Session::CONNECTED: |
| 113 // Don't care about these events. | 113 // Don't care about these events. |
| 114 break; | 114 break; |
| 115 | 115 case Session::AUTHENTICATING: |
| 116 handler_->OnConnectionAuthenticating(this); |
| 117 break; |
| 116 case Session::AUTHENTICATED: | 118 case Session::AUTHENTICATED: |
| 117 // Initialize channels. | 119 // Initialize channels. |
| 118 control_dispatcher_.reset(new HostControlDispatcher()); | 120 control_dispatcher_.reset(new HostControlDispatcher()); |
| 119 control_dispatcher_->Init( | 121 control_dispatcher_->Init( |
| 120 session_.get(), session_->config().control_config(), | 122 session_.get(), session_->config().control_config(), |
| 121 base::Bind(&ConnectionToClient::OnChannelInitialized, | 123 base::Bind(&ConnectionToClient::OnChannelInitialized, |
| 122 base::Unretained(this))); | 124 base::Unretained(this))); |
| 123 control_dispatcher_->set_clipboard_stub(clipboard_stub_); | 125 control_dispatcher_->set_clipboard_stub(clipboard_stub_); |
| 124 control_dispatcher_->set_host_stub(host_stub_); | 126 control_dispatcher_->set_host_stub(host_stub_); |
| 125 | 127 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 202 |
| 201 void ConnectionToClient::CloseChannels() { | 203 void ConnectionToClient::CloseChannels() { |
| 202 control_dispatcher_.reset(); | 204 control_dispatcher_.reset(); |
| 203 event_dispatcher_.reset(); | 205 event_dispatcher_.reset(); |
| 204 video_writer_.reset(); | 206 video_writer_.reset(); |
| 205 audio_writer_.reset(); | 207 audio_writer_.reset(); |
| 206 } | 208 } |
| 207 | 209 |
| 208 } // namespace protocol | 210 } // namespace protocol |
| 209 } // namespace remoting | 211 } // namespace remoting |
| OLD | NEW |