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 "jingle/glue/thread_wrapper.h" | 8 #include "jingle/glue/thread_wrapper.h" |
9 #include "remoting/base/tracer.h" | 9 #include "remoting/base/tracer.h" |
10 #include "remoting/client/chromoting_view.h" | 10 #include "remoting/client/chromoting_view.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void ChromotingClient::Initialize() { | 231 void ChromotingClient::Initialize() { |
232 if (!message_loop()->BelongsToCurrentThread()) { | 232 if (!message_loop()->BelongsToCurrentThread()) { |
233 message_loop()->PostTask( | 233 message_loop()->PostTask( |
234 FROM_HERE, | 234 FROM_HERE, |
235 NewTracedMethod(this, &ChromotingClient::Initialize)); | 235 NewTracedMethod(this, &ChromotingClient::Initialize)); |
236 return; | 236 return; |
237 } | 237 } |
238 | 238 |
239 TraceContext::tracer()->PrintString("Initializing client."); | 239 TraceContext::tracer()->PrintString("Initializing client."); |
240 | 240 |
241 const protocol::SessionConfig* config = connection_->config(); | |
242 | |
243 // Initialize the decoder. | 241 // Initialize the decoder. |
244 rectangle_decoder_->Initialize(config); | 242 rectangle_decoder_->Initialize(connection_->config()); |
245 | 243 |
246 // Schedule the input handler to process the event queue. | 244 // Schedule the input handler to process the event queue. |
247 input_handler_->Initialize(); | 245 input_handler_->Initialize(); |
248 } | 246 } |
249 | 247 |
250 //////////////////////////////////////////////////////////////////////////// | 248 //////////////////////////////////////////////////////////////////////////// |
251 // ClientStub control channel interface. | 249 // ClientStub control channel interface. |
252 void ChromotingClient::BeginSessionResponse( | 250 void ChromotingClient::BeginSessionResponse( |
253 const protocol::LocalLoginStatus* msg, Task* done) { | 251 const protocol::LocalLoginStatus* msg, Task* done) { |
254 if (!message_loop()->BelongsToCurrentThread()) { | 252 if (!message_loop()->BelongsToCurrentThread()) { |
(...skipping 11 matching lines...) Expand all Loading... |
266 if (msg->success()) { | 264 if (msg->success()) { |
267 connection_->OnClientAuthenticated(); | 265 connection_->OnClientAuthenticated(); |
268 } | 266 } |
269 | 267 |
270 view_->UpdateLoginStatus(msg->success(), msg->error_info()); | 268 view_->UpdateLoginStatus(msg->success(), msg->error_info()); |
271 done->Run(); | 269 done->Run(); |
272 delete done; | 270 delete done; |
273 } | 271 } |
274 | 272 |
275 } // namespace remoting | 273 } // namespace remoting |
OLD | NEW |