OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 FROM_HERE, | 351 FROM_HERE, |
352 NewRunnableMethod(this, | 352 NewRunnableMethod(this, |
353 &ChromotingHost::PauseSession, | 353 &ChromotingHost::PauseSession, |
354 pause)); | 354 pause)); |
355 return; | 355 return; |
356 } | 356 } |
357 ClientList::iterator client; | 357 ClientList::iterator client; |
358 for (client = clients_.begin(); client != clients_.end(); ++client) { | 358 for (client = clients_.begin(); client != clients_.end(); ++client) { |
359 client->get()->set_awaiting_continue_approval(pause); | 359 client->get()->set_awaiting_continue_approval(pause); |
360 } | 360 } |
361 desktop_environment_->OnPause(!pause); | 361 desktop_environment_->OnPause(pause); |
362 } | 362 } |
363 | 363 |
364 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { | 364 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { |
365 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); | 365 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); |
366 DCHECK_EQ(state_, kInitial); | 366 DCHECK_EQ(state_, kInitial); |
367 | 367 |
368 ui_strings_ = ui_strings; | 368 ui_strings_ = ui_strings; |
369 } | 369 } |
370 | 370 |
371 void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) { | 371 void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) { |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 | 635 |
636 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); | 636 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); |
637 it != shutdown_tasks_.end(); ++it) { | 637 it != shutdown_tasks_.end(); ++it) { |
638 (*it)->Run(); | 638 (*it)->Run(); |
639 delete *it; | 639 delete *it; |
640 } | 640 } |
641 shutdown_tasks_.clear(); | 641 shutdown_tasks_.clear(); |
642 } | 642 } |
643 | 643 |
644 } // namespace remoting | 644 } // namespace remoting |
OLD | NEW |