| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 recorder_ = new ScreenRecorder(context_->main_message_loop(), | 224 recorder_ = new ScreenRecorder(context_->main_message_loop(), |
| 225 context_->encode_message_loop(), | 225 context_->encode_message_loop(), |
| 226 context_->network_message_loop(), | 226 context_->network_message_loop(), |
| 227 desktop_environment_->capturer(), | 227 desktop_environment_->capturer(), |
| 228 encoder); | 228 encoder); |
| 229 | 229 |
| 230 // Immediately add the connection and start the session. | 230 // Immediately add the connection and start the session. |
| 231 recorder_->AddConnection(client->connection()); | 231 recorder_->AddConnection(client->connection()); |
| 232 recorder_->Start(); | 232 recorder_->Start(); |
| 233 desktop_environment_->OnSessionStarted(); | 233 desktop_environment_->OnSessionStarted(client->ClientClipboard()); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) { | 236 void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) { |
| 237 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 237 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
| 238 | 238 |
| 239 // Notify observers. | 239 // Notify observers. |
| 240 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | 240 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
| 241 OnAccessDenied(client->client_jid())); | 241 OnAccessDenied(client->client_jid())); |
| 242 } | 242 } |
| 243 | 243 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 OnShutdown()); | 433 OnShutdown()); |
| 434 | 434 |
| 435 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 435 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
| 436 it != shutdown_tasks_.end(); ++it) { | 436 it != shutdown_tasks_.end(); ++it) { |
| 437 it->Run(); | 437 it->Run(); |
| 438 } | 438 } |
| 439 shutdown_tasks_.clear(); | 439 shutdown_tasks_.clear(); |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace remoting | 442 } // namespace remoting |
| OLD | NEW |