summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-13 20:18:47 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-13 20:18:47 +0000
commit3ff2be6ac4070532a7a77eac3cdb5d51aa9f675e (patch)
treec14fd5efda900c0814b730d35e0a1c3f025760f2 /remoting/host/chromoting_host.cc
parentfaa876c586096d73af30506e14b39cf24e78f05f (diff)
downloadchromium_src-3ff2be6ac4070532a7a77eac3cdb5d51aa9f675e.zip
chromium_src-3ff2be6ac4070532a7a77eac3cdb5d51aa9f675e.tar.gz
chromium_src-3ff2be6ac4070532a7a77eac3cdb5d51aa9f675e.tar.bz2
Revert 88878 - Block remote mouse inputs for a short time when local input is received.
BUG= TEST= Review URL: http://codereview.chromium.org/7134048 TBR=jamiewalch@google.com Review URL: http://codereview.chromium.org/7134099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r--remoting/host/chromoting_host.cc38
1 files changed, 2 insertions, 36 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index f7a211f..44b2281 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -17,7 +17,6 @@
#include "remoting/host/event_executor.h"
#include "remoting/host/host_config.h"
#include "remoting/host/host_key_pair.h"
-#include "remoting/host/local_input_monitor.h"
#include "remoting/host/screen_recorder.h"
#include "remoting/host/user_authenticator.h"
#include "remoting/proto/auth.pb.h"
@@ -42,10 +41,9 @@ ChromotingHost* ChromotingHost::Create(ChromotingHostContext* context,
EventExecutor::Create(context->ui_message_loop(), capturer);
Curtain* curtain = Curtain::Create();
DisconnectWindow* disconnect_window = DisconnectWindow::Create();
- LocalInputMonitor* local_input_monitor = LocalInputMonitor::Create();
return Create(context, config,
new DesktopEnvironment(capturer, event_executor, curtain,
- disconnect_window, local_input_monitor),
+ disconnect_window),
access_verifier);
}
@@ -68,7 +66,6 @@ ChromotingHost::ChromotingHost(ChromotingHostContext* context,
state_(kInitial),
protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
is_curtained_(false),
- is_monitoring_local_inputs_(false),
is_me2mom_(false) {
DCHECK(desktop_environment_.get());
}
@@ -338,21 +335,6 @@ void ChromotingHost::set_protocol_config(
protocol_config_.reset(config);
}
-void ChromotingHost::LocalMouseMoved(const gfx::Point& new_pos) {
- if (MessageLoop::current() != context_->main_message_loop()) {
- context_->main_message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(this,
- &ChromotingHost::LocalMouseMoved,
- new_pos));
- return;
- }
- ClientList::iterator client;
- for (client = clients_.begin(); client != clients_.end(); ++client) {
- client->get()->LocalMouseMoved(new_pos);
- }
-}
-
void ChromotingHost::OnServerClosed() {
// Don't need to do anything here.
}
@@ -389,10 +371,8 @@ void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) {
if (!HasAuthenticatedClients()) {
EnableCurtainMode(false);
- if (is_me2mom_) {
- MonitorLocalInputs(false);
+ if (is_me2mom_)
ShowDisconnectWindow(false, std::string());
- }
}
}
@@ -439,17 +419,6 @@ void ChromotingHost::EnableCurtainMode(bool enable) {
is_curtained_ = enable;
}
-void ChromotingHost::MonitorLocalInputs(bool enable) {
- if (enable == is_monitoring_local_inputs_)
- return;
- if (enable) {
- desktop_environment_->local_input_monitor()->Start(this);
- } else {
- desktop_environment_->local_input_monitor()->Stop();
- }
- is_monitoring_local_inputs_ = enable;
-}
-
void ChromotingHost::LocalLoginSucceeded(
scoped_refptr<ConnectionToClient> connection) {
if (MessageLoop::current() != context_->main_message_loop()) {
@@ -496,11 +465,8 @@ void ChromotingHost::LocalLoginSucceeded(
// Immediately add the connection and start the session.
recorder_->AddConnection(connection);
recorder_->Start();
- // TODO(jamiewalch): Tidy up actions to be taken on connect/disconnect,
- // including closing the connection on failure of a critical operation.
EnableCurtainMode(true);
if (is_me2mom_) {
- MonitorLocalInputs(true);
std::string username = connection->session()->jid();
size_t pos = username.find('/');
if (pos != std::string::npos)