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

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: Rebase. 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
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/mouse_clamping_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..02ff17a214cb80255670012c92bd773fd2fe3581
--- /dev/null
+++ b/remoting/host/mouse_clamping_filter.h
@@ -0,0 +1,35 @@
+// 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/mouse_input_filter.h"
+
+namespace remoting {
+
+class VideoFrameCapturer;
+
+// Filtering InputStub implementation which clamps mouse each mouse event to
+// the current dimensions of a VideoFrameCapturer instance before passing
+// them on to the target |input_stub|.
+class MouseClampingFilter : public protocol::MouseInputFilter {
+ public:
+ MouseClampingFilter(VideoFrameCapturer* capturer,
+ protocol::InputStub* input_stub);
+ virtual ~MouseClampingFilter();
+
+ // InputStub overrides.
+ virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
+
+ private:
+ VideoFrameCapturer* capturer_;
+
+ DISALLOW_COPY_AND_ASSIGN(MouseClampingFilter);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/mouse_clamping_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698