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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/client/chromoting_view.h" | 8 #include "remoting/client/chromoting_view.h" |
9 #include "remoting/client/client_context.h" | 9 #include "remoting/client/client_context.h" |
10 #include "remoting/client/input_handler.h" | 10 #include "remoting/client/input_handler.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return; | 196 return; |
197 } | 197 } |
198 | 198 |
199 // Initialize the decoder. | 199 // Initialize the decoder. |
200 rectangle_decoder_->Initialize(connection_->config()); | 200 rectangle_decoder_->Initialize(connection_->config()); |
201 | 201 |
202 // Schedule the input handler to process the event queue. | 202 // Schedule the input handler to process the event queue. |
203 input_handler_->Initialize(); | 203 input_handler_->Initialize(); |
204 } | 204 } |
205 | 205 |
206 //////////////////////////////////////////////////////////////////////////// | |
207 // ClientStub control channel interface. | |
208 void ChromotingClient::BeginSessionResponse( | |
209 const protocol::LocalLoginStatus* msg, const base::Closure& done) { | |
210 if (!message_loop()->BelongsToCurrentThread()) { | |
211 thread_proxy_.PostTask(FROM_HERE, base::Bind( | |
212 &ChromotingClient::BeginSessionResponse, base::Unretained(this), | |
213 msg, done)); | |
214 return; | |
215 } | |
216 | |
217 VLOG(1) << "BeginSessionResponse received"; | |
218 | |
219 // Inform the connection that the client has been authenticated. This will | |
220 // enable the communication channels. | |
221 if (msg->success()) { | |
222 connection_->OnClientAuthenticated(); | |
223 } | |
224 | |
225 view_->UpdateLoginStatus(msg->success(), msg->error_info()); | |
226 done.Run(); | |
227 } | |
228 | |
229 } // namespace remoting | 206 } // namespace remoting |
OLD | NEW |