| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 *response = protocol::SessionManager::ACCEPT; | 259 *response = protocol::SessionManager::ACCEPT; |
| 260 | 260 |
| 261 LOG(INFO) << "Client connected: " << session->jid(); | 261 LOG(INFO) << "Client connected: " << session->jid(); |
| 262 | 262 |
| 263 // Create a client object. | 263 // Create a client object. |
| 264 protocol::ConnectionToClient* connection = | 264 protocol::ConnectionToClient* connection = |
| 265 new protocol::ConnectionToClient(session); | 265 new protocol::ConnectionToClient(session); |
| 266 ClientSession* client = new ClientSession( | 266 ClientSession* client = new ClientSession( |
| 267 this, connection, desktop_environment_->event_executor(), | 267 this, connection, desktop_environment_->event_executor(), |
| 268 desktop_environment_->capturer()); | 268 desktop_environment_->event_executor(), desktop_environment_->capturer()); |
| 269 clients_.push_back(client); | 269 clients_.push_back(client); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void ChromotingHost::set_protocol_config( | 272 void ChromotingHost::set_protocol_config( |
| 273 protocol::CandidateSessionConfig* config) { | 273 protocol::CandidateSessionConfig* config) { |
| 274 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 274 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
| 275 DCHECK(config); | 275 DCHECK(config); |
| 276 DCHECK_EQ(state_, kInitial); | 276 DCHECK_EQ(state_, kInitial); |
| 277 protocol_config_.reset(config); | 277 protocol_config_.reset(config); |
| 278 } | 278 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 OnShutdown()); | 365 OnShutdown()); |
| 366 | 366 |
| 367 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 367 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
| 368 it != shutdown_tasks_.end(); ++it) { | 368 it != shutdown_tasks_.end(); ++it) { |
| 369 it->Run(); | 369 it->Run(); |
| 370 } | 370 } |
| 371 shutdown_tasks_.clear(); | 371 shutdown_tasks_.clear(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace remoting | 374 } // namespace remoting |
| OLD | NEW |