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

Unified Diff: remoting/host/chromoting_host.cc

Issue 8725016: Refactor IT2Me-specific functions into a HostObserver subclass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation nits. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 1e958cc6aee81e45599d3cbe0f609f4f764bc3dc..f3d96122934b849426ea375a8cbd501a2f19631f 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -14,7 +14,6 @@
#include "remoting/base/encoder_row_based.h"
#include "remoting/base/encoder_vp8.h"
#include "remoting/host/chromoting_host_context.h"
-#include "remoting/host/curtain.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/host_config.h"
@@ -52,7 +51,6 @@ ChromotingHost::ChromotingHost(ChromotingHostContext* context,
stopping_recorders_(0),
state_(kInitial),
protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
- is_curtained_(false),
is_it2me_(false) {
DCHECK(desktop_environment_);
desktop_environment_->set_host(this);
@@ -208,12 +206,6 @@ void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
it != status_observers_.end(); ++it) {
(*it)->OnClientAuthenticated(jid);
}
- // TODO(jamiewalch): Tidy up actions to be taken on connect/disconnect,
- // including closing the connection on failure of a critical operation.
- EnableCurtainMode(true);
-
- std::string username = jid.substr(0, jid.find('/'));
- desktop_environment_->OnConnect(username);
}
void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) {
@@ -247,10 +239,6 @@ void ChromotingHost::OnSessionClosed(ClientSession* client) {
// Stop the recorder if there are no more clients.
StopScreenRecorder();
}
-
- // Disable the "curtain" if there are no more active clients.
- EnableCurtainMode(false);
- desktop_environment_->OnLastDisconnect();
}
}
@@ -383,7 +371,6 @@ void ChromotingHost::PauseSession(bool pause) {
for (client = clients_.begin(); client != clients_.end(); ++client) {
(*client)->set_awaiting_continue_approval(pause);
}
- desktop_environment_->OnPause(pause);
}
void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) {
@@ -420,16 +407,6 @@ int ChromotingHost::AuthenticatedClientsCount() const {
return authenticated_clients;
}
-void ChromotingHost::EnableCurtainMode(bool enable) {
- // TODO(jamiewalch): This will need to be more sophisticated when we think
- // about proper crash recovery and daemon mode.
- // TODO(wez): CurtainMode shouldn't be driven directly by ChromotingHost.
- if (is_it2me_ || enable == is_curtained_)
- return;
- desktop_environment_->curtain()->EnableCurtainMode(enable);
- is_curtained_ = enable;
-}
-
void ChromotingHost::StopScreenRecorder() {
DCHECK(context_->network_message_loop()->BelongsToCurrentThread());
DCHECK(recorder_.get());
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698