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_host.h" | 5 #include "remoting/protocol/connection_to_host.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/jingle_glue/http_port_allocator.h" | 10 #include "remoting/jingle_glue/http_port_allocator.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 void ConnectionToHost::OnClientAuthenticated() { | 234 void ConnectionToHost::OnClientAuthenticated() { |
235 // TODO(hclam): Don't send anything except authentication request if it is | 235 // TODO(hclam): Don't send anything except authentication request if it is |
236 // not authenticated. | 236 // not authenticated. |
237 state_ = STATE_AUTHENTICATED; | 237 state_ = STATE_AUTHENTICATED; |
238 | 238 |
239 // Create and enable the input stub now that we're authenticated. | 239 // Create and enable the input stub now that we're authenticated. |
240 input_stub_.reset(new InputSender(session_->event_channel())); | 240 input_stub_.reset(new InputSender(session_->event_channel())); |
241 input_stub_->OnAuthenticated(); | |
242 | |
243 // Enable control channel stubs. | |
244 if (host_stub_.get()) | |
245 host_stub_->OnAuthenticated(); | |
246 if (client_stub_) | |
247 client_stub_->OnAuthenticated(); | |
248 } | 241 } |
249 | 242 |
250 ConnectionToHost::State ConnectionToHost::state() const { | 243 ConnectionToHost::State ConnectionToHost::state() const { |
251 return state_; | 244 return state_; |
252 } | 245 } |
253 | 246 |
254 } // namespace protocol | 247 } // namespace protocol |
255 } // namespace remoting | 248 } // namespace remoting |
OLD | NEW |