summaryrefslogtreecommitdiffstats
path: root/remoting/client/plugin
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 00:56:18 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 00:56:18 +0000
commit86cbe6bb069e557edbf00d4464fdcaae48fee0f4 (patch)
tree628639ab01ab4a58496204f2eb43f172645ce5f6 /remoting/client/plugin
parentc65e2cc1411776492160cc34ca9bc433a94a8a8a (diff)
downloadchromium_src-86cbe6bb069e557edbf00d4464fdcaae48fee0f4.zip
chromium_src-86cbe6bb069e557edbf00d4464fdcaae48fee0f4.tar.gz
chromium_src-86cbe6bb069e557edbf00d4464fdcaae48fee0f4.tar.bz2
This CL moves much of the input tracking logic out of ClientSession, which means:
* We can re-use existing client-side input pipeline components. * Individual features of the input pipeline are isolated from one another. * It'll be easier to move some portions of the pipeline into ChromotingHost, where they belong. The CL makes the following changes: * Moves KeyEventTracker to InputEventTracker and has it release mouse buttons as well as keys. * Moves blocking of events when there is local input to a new RemoteInputFilter component. * Simplifies ClientSession to enable/disable events by setting and clearing the output InputStub on an InputFilter. * Simplifies ClientSession's SetDisableInputs() (used to temporarily disable inputs during the Continue dialog for IT2Me) to use the InputFilter mechanism. * Releases keys and buttons when entering the input-blocking state. BUG=118511 Review URL: http://codereview.chromium.org/9465035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin')
-rw-r--r--remoting/client/plugin/chromoting_instance.cc18
-rw-r--r--remoting/client/plugin/chromoting_instance.h4
-rw-r--r--remoting/client/plugin/pepper_input_handler.h4
3 files changed, 13 insertions, 13 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 30e3c51..7479ff9 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -38,7 +38,7 @@
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/host_stub.h"
-#include "remoting/protocol/key_event_tracker.h"
+#include "remoting/protocol/input_event_tracker.h"
// Windows defines 'PostMessage', so we have to undef it.
#if defined(PostMessage)
@@ -363,10 +363,10 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
mouse_input_filter_.reset(
new MouseInputFilter(host_connection_->input_stub()));
mouse_input_filter_->set_input_size(view_->get_view_size());
- key_event_tracker_.reset(
- new protocol::KeyEventTracker(mouse_input_filter_.get()));
+ input_tracker_.reset(
+ new protocol::InputEventTracker(mouse_input_filter_.get()));
input_handler_.reset(
- new PepperInputHandler(key_event_tracker_.get()));
+ new PepperInputHandler(input_tracker_.get()));
LOG(INFO) << "Connecting to " << config.host_jid
<< ". Local jid: " << config.local_jid << ".";
@@ -403,7 +403,7 @@ void ChromotingInstance::Disconnect() {
}
input_handler_.reset();
- key_event_tracker_.reset();
+ input_tracker_.reset();
mouse_input_filter_.reset();
host_connection_.reset();
@@ -415,13 +415,13 @@ void ChromotingInstance::OnIncomingIq(const std::string& iq) {
}
void ChromotingInstance::ReleaseAllKeys() {
- if (key_event_tracker_.get())
- key_event_tracker_->ReleaseAllKeys();
+ if (input_tracker_.get())
+ input_tracker_->ReleaseAll();
}
void ChromotingInstance::InjectKeyEvent(const protocol::KeyEvent& event) {
- if (key_event_tracker_.get())
- key_event_tracker_->InjectKeyEvent(event);
+ if (input_tracker_.get())
+ input_tracker_->InjectKeyEvent(event);
}
void ChromotingInstance::SendClipboardItem(const std::string& mime_type,
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 9fe3fdb..2f9410f 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -44,7 +44,7 @@ namespace remoting {
namespace protocol {
class ConnectionToHost;
-class KeyEventTracker;
+class InputEventTracker;
} // namespace protocol
class ChromotingClient;
@@ -183,7 +183,7 @@ class ChromotingInstance :
scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
scoped_ptr<MouseInputFilter> mouse_input_filter_;
- scoped_ptr<protocol::KeyEventTracker> key_event_tracker_;
+ scoped_ptr<protocol::InputEventTracker> input_tracker_;
scoped_ptr<PepperInputHandler> input_handler_;
scoped_ptr<ChromotingClient> client_;
diff --git a/remoting/client/plugin/pepper_input_handler.h b/remoting/client/plugin/pepper_input_handler.h
index 9c9423e..21fea3b 100644
--- a/remoting/client/plugin/pepper_input_handler.h
+++ b/remoting/client/plugin/pepper_input_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,7 +20,7 @@ class InputStub;
class PepperInputHandler {
public:
- PepperInputHandler(protocol::InputStub* input_stub);
+ explicit PepperInputHandler(protocol::InputStub* input_stub);
virtual ~PepperInputHandler();
bool HandleInputEvent(const pp::InputEvent& event);