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