Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 9465035: Move ClientSession's input logic into separate components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/host/client_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698