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/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 protocol::LocalLoginCredentials* credentials = | 313 protocol::LocalLoginCredentials* credentials = |
314 new protocol::LocalLoginCredentials(); | 314 new protocol::LocalLoginCredentials(); |
315 credentials->set_type(protocol::PASSWORD); | 315 credentials->set_type(protocol::PASSWORD); |
316 credentials->set_username(username); | 316 credentials->set_username(username); |
317 credentials->set_credential(password.data(), password.length()); | 317 credentials->set_credential(password.data(), password.length()); |
318 | 318 |
319 host_connection_->host_stub()->BeginSessionRequest( | 319 host_connection_->host_stub()->BeginSessionRequest( |
320 credentials, | 320 credentials, |
321 new DeleteTask<protocol::LocalLoginCredentials>(credentials)); | 321 base::Bind(&DeletePointer<protocol::LocalLoginCredentials>, credentials)); |
322 } | 322 } |
323 | 323 |
324 void ChromotingInstance::SetScaleToFit(bool scale_to_fit) { | 324 void ChromotingInstance::SetScaleToFit(bool scale_to_fit) { |
325 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); | 325 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); |
326 | 326 |
327 if (scale_to_fit == scale_to_fit_) | 327 if (scale_to_fit == scale_to_fit_) |
328 return; | 328 return; |
329 | 329 |
330 scale_to_fit_ = scale_to_fit; | 330 scale_to_fit_ = scale_to_fit; |
331 if (scale_to_fit) { | 331 if (scale_to_fit) { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 initial_policy_received_ = true; | 519 initial_policy_received_ = true; |
520 enable_client_nat_traversal_ = traversal_policy; | 520 enable_client_nat_traversal_ = traversal_policy; |
521 | 521 |
522 if (!delayed_connect_.is_null()) { | 522 if (!delayed_connect_.is_null()) { |
523 thread_proxy_->PostTask(FROM_HERE, delayed_connect_); | 523 thread_proxy_->PostTask(FROM_HERE, delayed_connect_); |
524 delayed_connect_.Reset(); | 524 delayed_connect_.Reset(); |
525 } | 525 } |
526 } | 526 } |
527 | 527 |
528 } // namespace remoting | 528 } // namespace remoting |
OLD | NEW |