OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 session->set_config(config); | 338 session->set_config(config); |
339 | 339 |
340 *response = protocol::SessionManager::ACCEPT; | 340 *response = protocol::SessionManager::ACCEPT; |
341 | 341 |
342 LOG(INFO) << "Client connected: " << session->jid(); | 342 LOG(INFO) << "Client connected: " << session->jid(); |
343 | 343 |
344 // Create a client object. | 344 // Create a client object. |
345 scoped_ptr<protocol::ConnectionToClient> connection( | 345 scoped_ptr<protocol::ConnectionToClient> connection( |
346 new protocol::ConnectionToClient(session)); | 346 new protocol::ConnectionToClient(session)); |
347 ClientSession* client = new ClientSession( | 347 ClientSession* client = new ClientSession( |
348 this, connection.Pass(), desktop_environment_->event_executor(), | 348 this, |
349 desktop_environment_->capturer(), max_session_duration_); | 349 connection.Pass(), |
| 350 desktop_environment_->event_executor(), |
| 351 desktop_environment_->event_executor(), |
| 352 desktop_environment_->capturer(), |
| 353 max_session_duration_); |
350 clients_.push_back(client); | 354 clients_.push_back(client); |
351 } | 355 } |
352 | 356 |
353 void ChromotingHost::set_protocol_config( | 357 void ChromotingHost::set_protocol_config( |
354 protocol::CandidateSessionConfig* config) { | 358 protocol::CandidateSessionConfig* config) { |
355 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 359 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
356 DCHECK(config); | 360 DCHECK(config); |
357 DCHECK_EQ(state_, kInitial); | 361 DCHECK_EQ(state_, kInitial); |
358 protocol_config_.reset(config); | 362 protocol_config_.reset(config); |
359 } | 363 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 OnShutdown()); | 488 OnShutdown()); |
485 | 489 |
486 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 490 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
487 it != shutdown_tasks_.end(); ++it) { | 491 it != shutdown_tasks_.end(); ++it) { |
488 it->Run(); | 492 it->Run(); |
489 } | 493 } |
490 shutdown_tasks_.clear(); | 494 shutdown_tasks_.clear(); |
491 } | 495 } |
492 | 496 |
493 } // namespace remoting | 497 } // namespace remoting |
OLD | NEW |