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_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return input_stub_; | 101 return input_stub_; |
102 } | 102 } |
103 | 103 |
104 void ConnectionToClient::OnSessionStateChange(Session::State state) { | 104 void ConnectionToClient::OnSessionStateChange(Session::State state) { |
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::CONNECTED: | 112 case Session::CONNECTED: |
112 // Don't care about these events. | 113 // Don't care about these events. |
113 break; | 114 break; |
114 | 115 |
115 case Session::AUTHENTICATED: | 116 case Session::AUTHENTICATED: |
116 // Initialize channels. | 117 // Initialize channels. |
117 control_dispatcher_.reset(new HostControlDispatcher()); | 118 control_dispatcher_.reset(new HostControlDispatcher()); |
118 control_dispatcher_->Init( | 119 control_dispatcher_->Init( |
119 session_.get(), session_->config().control_config(), | 120 session_.get(), session_->config().control_config(), |
120 base::Bind(&ConnectionToClient::OnChannelInitialized, | 121 base::Bind(&ConnectionToClient::OnChannelInitialized, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 200 |
200 void ConnectionToClient::CloseChannels() { | 201 void ConnectionToClient::CloseChannels() { |
201 control_dispatcher_.reset(); | 202 control_dispatcher_.reset(); |
202 event_dispatcher_.reset(); | 203 event_dispatcher_.reset(); |
203 video_writer_.reset(); | 204 video_writer_.reset(); |
204 audio_writer_.reset(); | 205 audio_writer_.reset(); |
205 } | 206 } |
206 | 207 |
207 } // namespace protocol | 208 } // namespace protocol |
208 } // namespace remoting | 209 } // namespace remoting |
OLD | NEW |