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

Unified Diff: remoting/protocol/mouse_input_filter.h

Issue 10255007: Clamp events before they are sent to EventExecutors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo. Created 8 years, 8 months 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/event_executor_mac.cc ('k') | remoting/protocol/mouse_input_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/mouse_input_filter.h
diff --git a/remoting/client/mouse_input_filter.h b/remoting/protocol/mouse_input_filter.h
similarity index 72%
rename from remoting/client/mouse_input_filter.h
rename to remoting/protocol/mouse_input_filter.h
index fa10bff5787c6c1cc3a1b3325ef9d45e5435cac1..3b2a275921eeb4d46b511aa88b469bf1d58bcfc9 100644
--- a/remoting/client/mouse_input_filter.h
+++ b/remoting/protocol/mouse_input_filter.h
@@ -2,23 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_
-#define REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_
+#ifndef REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_
+#define REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "remoting/protocol/input_filter.h"
#include "remoting/protocol/input_stub.h"
#include "third_party/skia/include/core/SkTypes.h"
#include "third_party/skia/include/core/SkSize.h"
namespace remoting {
+namespace protocol {
// Filtering InputStub implementation which scales mouse events based on the
// supplied input and output dimensions, and clamps their coordinates to the
// output dimensions, before passing events on to |input_stub|.
-class MouseInputFilter : public protocol::InputStub {
+class MouseInputFilter : public InputFilter {
public:
- explicit MouseInputFilter(protocol::InputStub* input_stub);
+ explicit MouseInputFilter(InputStub* input_stub);
virtual ~MouseInputFilter();
// Specify the input dimensions for mouse events.
@@ -27,19 +29,17 @@ class MouseInputFilter : public protocol::InputStub {
// Specify the output dimensions.
void set_output_size(const SkISize& size);
- // InputStub interface.
- virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
+ // InputStub overrides.
virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
private:
- protocol::InputStub* input_stub_;
-
SkISize input_max_;
SkISize output_max_;
DISALLOW_COPY_AND_ASSIGN(MouseInputFilter);
};
+} // namespace protocol
} // namespace remoting
-#endif // REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_
+#endif // REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_
« no previous file with comments | « remoting/host/event_executor_mac.cc ('k') | remoting/protocol/mouse_input_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698