| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 228 |
| 229 recorder_ = new ScreenRecorder(context_->capture_task_runner(), | 229 recorder_ = new ScreenRecorder(context_->capture_task_runner(), |
| 230 context_->encode_task_runner(), | 230 context_->encode_task_runner(), |
| 231 context_->network_task_runner(), | 231 context_->network_task_runner(), |
| 232 desktop_environment_->capturer(), | 232 desktop_environment_->capturer(), |
| 233 video_encoder); | 233 video_encoder); |
| 234 if (client->connection()->session()->config().is_audio_enabled()) { | 234 if (client->connection()->session()->config().is_audio_enabled()) { |
| 235 scoped_ptr<AudioEncoder> audio_encoder = | 235 scoped_ptr<AudioEncoder> audio_encoder = |
| 236 CreateAudioEncoder(client->connection()->session()->config()); | 236 CreateAudioEncoder(client->connection()->session()->config()); |
| 237 audio_scheduler_ = new AudioScheduler( | 237 audio_scheduler_ = new AudioScheduler( |
| 238 context_->capture_task_runner(), | 238 context_->audio_task_runner(), |
| 239 context_->network_task_runner(), | 239 context_->network_task_runner(), |
| 240 desktop_environment_->audio_capturer(), | 240 desktop_environment_->audio_capturer(), |
| 241 audio_encoder.Pass(), | 241 audio_encoder.Pass(), |
| 242 client->connection()->audio_stub()); | 242 client->connection()->audio_stub()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 // Immediately add the connection and start the session. | 245 // Immediately add the connection and start the session. |
| 246 recorder_->AddConnection(client->connection()); | 246 recorder_->AddConnection(client->connection()); |
| 247 recorder_->Start(); | 247 recorder_->Start(); |
| 248 desktop_environment_->OnSessionStarted(client->CreateClipboardProxy()); | 248 desktop_environment_->OnSessionStarted(client->CreateClipboardProxy()); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 OnShutdown()); | 501 OnShutdown()); |
| 502 | 502 |
| 503 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 503 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
| 504 it != shutdown_tasks_.end(); ++it) { | 504 it != shutdown_tasks_.end(); ++it) { |
| 505 it->Run(); | 505 it->Run(); |
| 506 } | 506 } |
| 507 shutdown_tasks_.clear(); | 507 shutdown_tasks_.clear(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 } // namespace remoting | 510 } // namespace remoting |
| OLD | NEW |