diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 16:57:44 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 16:57:44 +0000 |
commit | f41095f88ee69a82e4931b88a73dbe8e54cc34f9 (patch) | |
tree | 38a683154c5978fd669570b235c44708d57604c1 /remoting/host/chromoting_host.cc | |
parent | 996ae9b36dde904605c55bbb0cad8360f7a59ac6 (diff) | |
download | chromium_src-f41095f88ee69a82e4931b88a73dbe8e54cc34f9.zip chromium_src-f41095f88ee69a82e4931b88a73dbe8e54cc34f9.tar.gz chromium_src-f41095f88ee69a82e4931b88a73dbe8e54cc34f9.tar.bz2 |
Initial disconnect window framework and mac implementation.
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/7077038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r-- | remoting/host/chromoting_host.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index 5227e34..7f3cadd 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -13,6 +13,7 @@ #include "remoting/host/chromoting_host_context.h" #include "remoting/host/curtain.h" #include "remoting/host/desktop_environment.h" +#include "remoting/host/disconnect_window.h" #include "remoting/host/event_executor.h" #include "remoting/host/host_config.h" #include "remoting/host/host_key_pair.h" @@ -39,8 +40,10 @@ ChromotingHost* ChromotingHost::Create(ChromotingHostContext* context, EventExecutor* event_executor = EventExecutor::Create(context->ui_message_loop(), capturer); Curtain* curtain = Curtain::Create(); + DisconnectWindow* disconnect_window = DisconnectWindow::Create(); return Create(context, config, - new DesktopEnvironment(capturer, event_executor, curtain), + new DesktopEnvironment(capturer, event_executor, curtain, + disconnect_window), access_verifier); } @@ -366,8 +369,11 @@ void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) { // Also remove reference to ConnectionToClient from this object. clients_.erase(client); - if (!HasAuthenticatedClients()) + if (!HasAuthenticatedClients()) { EnableCurtainMode(false); + if (is_me2mom_) + desktop_environment_->disconnect_window()->Hide(); + } } // TODO(sergeyu): Move this to SessionManager? @@ -460,6 +466,13 @@ void ChromotingHost::LocalLoginSucceeded( recorder_->AddConnection(connection); recorder_->Start(); EnableCurtainMode(true); + if (is_me2mom_) { + std::string username = connection->session()->jid(); + size_t pos = username.find('/'); + if (pos != std::string::npos) + username.replace(pos, std::string::npos, ""); + desktop_environment_->disconnect_window()->Show(this, username); + } } void ChromotingHost::LocalLoginFailed( |