summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 23:49:51 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 23:49:51 +0000
commit58f1ad4a97a67ac2a4422d5f62cf9c3973b484e1 (patch)
treef265cceebebdf03b5ef2d94eada53e8425062584 /remoting/host
parent3d6c8c4a2187de101d65e6df7ded934727190e89 (diff)
downloadchromium_src-58f1ad4a97a67ac2a4422d5f62cf9c3973b484e1.zip
chromium_src-58f1ad4a97a67ac2a4422d5f62cf9c3973b484e1.tar.gz
chromium_src-58f1ad4a97a67ac2a4422d5f62cf9c3973b484e1.tar.bz2
The client's connection video stub is created only after the connection has been authenticated. This CL makes sure that the client session connects the video stub after if what created.
BUG=169126 Review URL: https://codereview.chromium.org/11827055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/client_session.cc3
-rw-r--r--remoting/host/mouse_clamping_filter.cc5
-rw-r--r--remoting/host/mouse_clamping_filter.h7
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;