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

Unified Diff: remoting/host/mouse_clamping_filter.h

Issue 11781003: Connect to DesktopEnvironment's stubs only when audio/video schedulers are about to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback #2 Created 7 years, 11 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_unittest.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
index 02ff17a214cb80255670012c92bd773fd2fe3581..9d8503cbe422d64c87b22fd1f75e122d3b450341 100644
--- a/remoting/host/mouse_clamping_filter.h
+++ b/remoting/host/mouse_clamping_filter.h
@@ -7,25 +7,30 @@
#include "base/compiler_specific.h"
#include "remoting/protocol/mouse_input_filter.h"
+#include "remoting/protocol/video_stub.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 {
+// Filtering VideoStub implementation which configures a MouseInputFilter to
+// clamp mouse events to fall within the dimensions of the most-recently
+// received video frame.
+class MouseClampingFilter : public protocol::VideoStub {
public:
- MouseClampingFilter(VideoFrameCapturer* capturer,
- protocol::InputStub* input_stub);
+ MouseClampingFilter(protocol::InputStub* input_stub,
+ protocol::VideoStub* video_stub);
virtual ~MouseClampingFilter();
- // InputStub overrides.
- virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
+ protocol::InputStub* input_filter() { return &input_filter_; }
+
+ // protocol::VideoStub implementation.
+ virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
+ const base::Closure& done) OVERRIDE;
private:
- VideoFrameCapturer* capturer_;
+ // Clamps mouse event coordinates to the video dimensions.
+ protocol::MouseInputFilter input_filter_;
+
+ protocol::VideoStub* video_stub_;
DISALLOW_COPY_AND_ASSIGN(MouseClampingFilter);
};
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/mouse_clamping_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698