diff options
-rw-r--r-- | remoting/host/client_session.cc | 3 | ||||
-rw-r--r-- | remoting/host/mouse_clamping_filter.cc | 5 | ||||
-rw-r--r-- | remoting/host/mouse_clamping_filter.h | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index 58320c9..63764e8 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc @@ -43,7 +43,7 @@ ClientSession::ClientSession( client_jid_(connection_->session()->jid()), input_tracker_(&host_input_filter_), remote_input_filter_(&input_tracker_), - mouse_clamping_filter_(&remote_input_filter_, connection_->video_stub()), + mouse_clamping_filter_(&remote_input_filter_), disable_input_filter_(mouse_clamping_filter_.input_filter()), disable_clipboard_filter_(clipboard_echo_filter_.host_filter()), auth_input_filter_(&disable_input_filter_), @@ -108,6 +108,7 @@ void ClientSession::OnConnectionAuthenticated( auth_clipboard_filter_.set_enabled(true); clipboard_echo_filter_.set_client_stub(connection_->client_stub()); + mouse_clamping_filter_.set_video_stub(connection_->video_stub()); if (max_duration_ > base::TimeDelta()) { // TODO(simonmorris): Let Disconnect() tell the client that the diff --git a/remoting/host/mouse_clamping_filter.cc b/remoting/host/mouse_clamping_filter.cc index 3fdecbd..db01c10 100644 --- a/remoting/host/mouse_clamping_filter.cc +++ b/remoting/host/mouse_clamping_filter.cc @@ -10,10 +10,9 @@ namespace remoting { MouseClampingFilter::MouseClampingFilter( - protocol::InputStub* input_stub, - protocol::VideoStub* video_stub) + protocol::InputStub* input_stub) : input_filter_(input_stub), - video_stub_(video_stub) { + video_stub_(NULL) { } MouseClampingFilter::~MouseClampingFilter() { diff --git a/remoting/host/mouse_clamping_filter.h b/remoting/host/mouse_clamping_filter.h index 9d8503cb..5d5a71c 100644 --- a/remoting/host/mouse_clamping_filter.h +++ b/remoting/host/mouse_clamping_filter.h @@ -16,12 +16,15 @@ namespace remoting { // received video frame. class MouseClampingFilter : public protocol::VideoStub { public: - MouseClampingFilter(protocol::InputStub* input_stub, - protocol::VideoStub* video_stub); + explicit MouseClampingFilter(protocol::InputStub* input_stub); virtual ~MouseClampingFilter(); protocol::InputStub* input_filter() { return &input_filter_; } + void set_video_stub(protocol::VideoStub* video_stub) { + video_stub_ = video_stub; + } + // protocol::VideoStub implementation. virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, const base::Closure& done) OVERRIDE; |