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

Unified Diff: remoting/client/mouse_input_filter.h

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
Index: remoting/client/mouse_input_filter.h
diff --git a/remoting/client/mouse_input_filter.h b/remoting/client/mouse_input_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdb0ab7746c1df342b836ee9f1f7c98a3f345450
--- /dev/null
+++ b/remoting/client/mouse_input_filter.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2011 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.
+
+#ifndef REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_
+#define REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "remoting/protocol/input_stub.h"
+#include "third_party/skia/include/core/SkSize.h"
+
+namespace remoting {
+
+class MouseInputFilter : public protocol::InputStub {
Sergey Ulanov 2011/12/20 00:05:35 Add comments that explain what this class does
Jamie 2011/12/20 00:51:57 ...And "Filters mouse input" is not sufficient :)
Wez 2011/12/20 07:14:14 Done.
+ public:
+ MouseInputFilter(protocol::InputStub* input_stub);
+ virtual ~MouseInputFilter();
+
+ // InputStub interface.
+ virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
+ virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
+
+ // Specify the input dimensions for mouse events.
+ void SetInputDimensions(const SkISize& size);
Sergey Ulanov 2011/12/20 00:05:35 Maybe set_input_size()?
Wez 2011/12/20 07:14:14 Done.
+
+ // Specify the output dimensions. Mouse events will be scaled to these
+ // dimensions, and clamped to them if the mouse moves outside the input area.
+ void SetOutputDimensions(const SkISize& size);
Sergey Ulanov 2011/12/20 00:05:35 set_output_size()?
Wez 2011/12/20 07:14:14 Done.
+
+ protected:
Sergey Ulanov 2011/12/20 00:05:35 private?
Wez 2011/12/20 07:14:14 Done.
+ protocol::InputStub* input_stub_;
+
+ SkISize input_size_;
+ SkISize output_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(MouseInputFilter);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698