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

Unified Diff: remoting/host/mouse_clamping_filter.h

Issue 10829409: Add MouseClampingFilter and update ClientSession to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid implementation inheritance in MouseClampingFilter. Created 8 years, 4 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
Index: remoting/host/mouse_clamping_filter.h
diff --git a/remoting/host/mouse_clamping_filter.h b/remoting/host/mouse_clamping_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..ce2bae2d300e94885be084764c47b9ff77335c67
--- /dev/null
+++ b/remoting/host/mouse_clamping_filter.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_
+#define REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_
+
+#include "base/compiler_specific.h"
+#include "remoting/protocol/input_filter.h"
+
+namespace remoting {
+
+namespace protocol {
+class MouseInputFilter;
+}
+
+class VideoFrameCapturer;
+
+// InputFilter implementation which uses a target MouseInputFilter to clamp
+// mouse events to the current VideoFrameCapturer dimensions.
+class MouseClampingFilter : public protocol::InputFilter {
+ public:
+ MouseClampingFilter(VideoFrameCapturer* capturer,
+ protocol::MouseInputFilter* input_stub);
+ virtual ~MouseClampingFilter();
+
+ // InputFilter overrides.
+ virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
+
+ private:
+ VideoFrameCapturer* capturer_;
+ protocol::MouseInputFilter* mouse_input_filter_;
+
+ DISALLOW_COPY_AND_ASSIGN(MouseClampingFilter);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698