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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 recorder_ = new ScreenRecorder(context_->main_message_loop(), | 223 recorder_ = new ScreenRecorder(context_->main_message_loop(), |
224 context_->encode_message_loop(), | 224 context_->encode_message_loop(), |
225 context_->network_message_loop(), | 225 context_->network_message_loop(), |
226 desktop_environment_->capturer(), | 226 desktop_environment_->capturer(), |
227 encoder); | 227 encoder); |
228 | 228 |
229 // Immediately add the connection and start the session. | 229 // Immediately add the connection and start the session. |
230 recorder_->AddConnection(client->connection()); | 230 recorder_->AddConnection(client->connection()); |
231 recorder_->Start(); | 231 recorder_->Start(); |
232 desktop_environment_->OnSessionStarted(); | 232 desktop_environment_->OnSessionStarted(client->CreateClipboardProxy()); |
233 | 233 |
234 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | 234 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
235 OnClientConnected(client->client_jid())); | 235 OnClientConnected(client->client_jid())); |
236 } | 236 } |
237 | 237 |
238 void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) { | 238 void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) { |
239 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 239 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
240 | 240 |
241 // Notify observers. | 241 // Notify observers. |
242 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | 242 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 OnShutdown()); | 450 OnShutdown()); |
451 | 451 |
452 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 452 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
453 it != shutdown_tasks_.end(); ++it) { | 453 it != shutdown_tasks_.end(); ++it) { |
454 it->Run(); | 454 it->Run(); |
455 } | 455 } |
456 shutdown_tasks_.clear(); | 456 shutdown_tasks_.clear(); |
457 } | 457 } |
458 | 458 |
459 } // namespace remoting | 459 } // namespace remoting |
OLD | NEW |