OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/mouse_clamping_filter.h" | 5 #include "remoting/host/mouse_clamping_filter.h" |
6 | 6 |
7 #include "remoting/host/video_frame_capturer.h" | 7 #include "remoting/capturer/video_frame_capturer.h" |
8 #include "remoting/proto/event.pb.h" | 8 #include "remoting/proto/event.pb.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer, | 12 MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer, |
13 protocol::InputStub* input_stub) | 13 protocol::InputStub* input_stub) |
14 : MouseInputFilter(input_stub), capturer_(capturer) { | 14 : MouseInputFilter(input_stub), capturer_(capturer) { |
15 } | 15 } |
16 | 16 |
17 MouseClampingFilter::~MouseClampingFilter() { | 17 MouseClampingFilter::~MouseClampingFilter() { |
18 } | 18 } |
19 | 19 |
20 void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) { | 20 void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) { |
21 // Ensure that the MouseInputFilter is clamping to the current dimensions. | 21 // Ensure that the MouseInputFilter is clamping to the current dimensions. |
22 set_output_size(capturer_->size_most_recent()); | 22 set_output_size(capturer_->size_most_recent()); |
23 set_input_size(capturer_->size_most_recent()); | 23 set_input_size(capturer_->size_most_recent()); |
24 MouseInputFilter::InjectMouseEvent(event); | 24 MouseInputFilter::InjectMouseEvent(event); |
25 } | 25 } |
26 | 26 |
27 } // namespace remoting | 27 } // namespace remoting |
OLD | NEW |