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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 336 |
337 void ChromotingHost::PauseSession(bool pause) { | 337 void ChromotingHost::PauseSession(bool pause) { |
338 if (!context_->network_message_loop()->BelongsToCurrentThread()) { | 338 if (!context_->network_message_loop()->BelongsToCurrentThread()) { |
339 context_->network_message_loop()->PostTask( | 339 context_->network_message_loop()->PostTask( |
340 FROM_HERE, base::Bind(&ChromotingHost::PauseSession, this, pause)); | 340 FROM_HERE, base::Bind(&ChromotingHost::PauseSession, this, pause)); |
341 return; | 341 return; |
342 } | 342 } |
343 | 343 |
344 ClientList::iterator client; | 344 ClientList::iterator client; |
345 for (client = clients_.begin(); client != clients_.end(); ++client) { | 345 for (client = clients_.begin(); client != clients_.end(); ++client) { |
346 (*client)->set_awaiting_continue_approval(pause); | 346 (*client)->SetDisableInputs(pause); |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { | 350 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { |
351 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 351 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
352 DCHECK_EQ(state_, kInitial); | 352 DCHECK_EQ(state_, kInitial); |
353 | 353 |
354 ui_strings_ = ui_strings; | 354 ui_strings_ = ui_strings; |
355 } | 355 } |
356 | 356 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 OnShutdown()); | 409 OnShutdown()); |
410 | 410 |
411 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 411 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
412 it != shutdown_tasks_.end(); ++it) { | 412 it != shutdown_tasks_.end(); ++it) { |
413 it->Run(); | 413 it->Run(); |
414 } | 414 } |
415 shutdown_tasks_.clear(); | 415 shutdown_tasks_.clear(); |
416 } | 416 } |
417 | 417 |
418 } // namespace remoting | 418 } // namespace remoting |
OLD | NEW |