| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 void ChromotingHost::PauseSession(bool pause) { | 293 void ChromotingHost::PauseSession(bool pause) { |
| 294 if (!context_->network_message_loop()->BelongsToCurrentThread()) { | 294 if (!context_->network_message_loop()->BelongsToCurrentThread()) { |
| 295 context_->network_message_loop()->PostTask( | 295 context_->network_message_loop()->PostTask( |
| 296 FROM_HERE, base::Bind(&ChromotingHost::PauseSession, this, pause)); | 296 FROM_HERE, base::Bind(&ChromotingHost::PauseSession, this, pause)); |
| 297 return; | 297 return; |
| 298 } | 298 } |
| 299 | 299 |
| 300 ClientList::iterator client; | 300 ClientList::iterator client; |
| 301 for (client = clients_.begin(); client != clients_.end(); ++client) { | 301 for (client = clients_.begin(); client != clients_.end(); ++client) { |
| 302 (*client)->set_awaiting_continue_approval(pause); | 302 (*client)->SetDisableInputs(pause); |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| 306 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { | 306 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { |
| 307 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 307 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
| 308 DCHECK_EQ(state_, kInitial); | 308 DCHECK_EQ(state_, kInitial); |
| 309 | 309 |
| 310 ui_strings_ = ui_strings; | 310 ui_strings_ = ui_strings; |
| 311 } | 311 } |
| 312 | 312 |
| (...skipping 52 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 |