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

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

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 return; 368 return;
369 } 369 }
370 370
371 while (!clients_.empty()) { 371 while (!clients_.empty()) {
372 size_t size = clients_.size(); 372 size_t size = clients_.size();
373 clients_.front()->Disconnect(); 373 clients_.front()->Disconnect();
374 CHECK_EQ(clients_.size(), size - 1); 374 CHECK_EQ(clients_.size(), size - 1);
375 } 375 }
376 } 376 }
377 377
378 void ChromotingHost::DisconnectClient(DesktopEnvironment* desktop_environment) {
379 DCHECK(network_task_runner_->BelongsToCurrentThread());
380
381 for (ClientList::iterator i = clients_.begin(); i != clients_.end(); ++i) {
382 if ((*i)->desktop_environment() == desktop_environment) {
383 (*i)->Disconnect();
384 break;
385 }
386 }
387 }
388
378 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { 389 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) {
379 DCHECK(network_task_runner_->BelongsToCurrentThread()); 390 DCHECK(network_task_runner_->BelongsToCurrentThread());
380 DCHECK_EQ(state_, kInitial); 391 DCHECK_EQ(state_, kInitial);
381 392
382 ui_strings_ = ui_strings; 393 ui_strings_ = ui_strings;
383 } 394 }
384 395
385 void ChromotingHost::OnClientStopped() { 396 void ChromotingHost::OnClientStopped() {
386 DCHECK(network_task_runner_->BelongsToCurrentThread()); 397 DCHECK(network_task_runner_->BelongsToCurrentThread());
387 398
(...skipping 25 matching lines...) Expand all
413 OnShutdown()); 424 OnShutdown());
414 425
415 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); 426 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin();
416 it != shutdown_tasks_.end(); ++it) { 427 it != shutdown_tasks_.end(); ++it) {
417 it->Run(); 428 it->Run();
418 } 429 }
419 shutdown_tasks_.clear(); 430 shutdown_tasks_.clear();
420 } 431 }
421 432
422 } // namespace remoting 433 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698