diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 04:16:28 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 04:16:28 +0000 |
commit | 819047947b8cead99fe9ca81bcbb181f744fc5a5 (patch) | |
tree | 19bf7f44a19b7ca09d5bb2a91305b45dba979574 /remoting/host/chromoting_host.cc | |
parent | 6aad7dc0fd39b04af7a5dd3ab0007955bbf3d238 (diff) | |
download | chromium_src-819047947b8cead99fe9ca81bcbb181f744fc5a5.zip chromium_src-819047947b8cead99fe9ca81bcbb181f744fc5a5.tar.gz chromium_src-819047947b8cead99fe9ca81bcbb181f744fc5a5.tar.bz2 |
[Chromoting] Request the daemon to open a terminal once a connection has been accepted.
Opening a terminal will invoke (once this functionality is in place) the desktop integration code. The latter will pass a client end of the IPC channel back to the desktop environment object.
BUG=134694
Review URL: https://chromiumcodereview.appspot.com/11028128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r-- | remoting/host/chromoting_host.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index 40f136e..6fe3d11 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -11,7 +11,6 @@ #include "build/build_config.h" #include "remoting/base/constants.h" #include "remoting/host/chromoting_host_context.h" -#include "remoting/host/desktop_environment.h" #include "remoting/host/desktop_environment_factory.h" #include "remoting/host/event_executor.h" #include "remoting/host/host_config.h" @@ -307,10 +306,6 @@ void ChromotingHost::OnIncomingSession( LOG(INFO) << "Client connected: " << session->jid(); - // Create the desktop integration implementation for the client to use. - scoped_ptr<DesktopEnvironment> desktop_environment = - desktop_environment_factory_->Create(); - // Create a client object. scoped_ptr<protocol::ConnectionToClient> connection( new protocol::ConnectionToClient(session)); @@ -320,7 +315,7 @@ void ChromotingHost::OnIncomingSession( encode_task_runner_, network_task_runner_, connection.Pass(), - desktop_environment.Pass(), + desktop_environment_factory_, max_session_duration_); clients_.push_back(client); clients_count_++; @@ -375,6 +370,17 @@ void ChromotingHost::DisconnectAllClients() { } } +void ChromotingHost::DisconnectClient(DesktopEnvironment* desktop_environment) { + DCHECK(network_task_runner_->BelongsToCurrentThread()); + + for (ClientList::iterator i = clients_.begin(); i != clients_.end(); ++i) { + if ((*i)->desktop_environment() == desktop_environment) { + (*i)->Disconnect(); + break; + } + } +} + void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { DCHECK(network_task_runner_->BelongsToCurrentThread()); DCHECK_EQ(state_, kInitial); |