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 #ifndef REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ | 5 #ifndef REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ |
6 #define REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ | 6 #define REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "remoting/protocol/mouse_input_filter.h" | 9 #include "remoting/protocol/mouse_input_filter.h" |
10 #include "remoting/protocol/video_stub.h" | |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 | 13 |
13 class VideoFrameCapturer; | |
14 | |
15 // Filtering InputStub implementation which clamps mouse each mouse event to | 14 // Filtering InputStub implementation which clamps mouse each mouse event to |
16 // the current dimensions of a VideoFrameCapturer instance before passing | 15 // the current dimensions of a VideoFrameCapturer instance before passing |
Wez
2013/01/08 18:34:00
nit: (Assuming the composition change suggested be
alexeypa (please no reviews)
2013/01/08 20:00:14
Done.
| |
17 // them on to the target |input_stub|. | 16 // them on to the target |input_stub|. |
18 class MouseClampingFilter : public protocol::MouseInputFilter { | 17 class MouseClampingFilter |
18 : public protocol::MouseInputFilter, | |
Wez
2013/01/08 18:34:00
It would be cleaner to compose with MouseInputFilt
alexeypa (please no reviews)
2013/01/08 20:00:14
Done.
Wez
2013/01/08 21:02:42
I'd actually thought that the composed implementat
alexeypa (please no reviews)
2013/01/08 21:30:24
Done.
| |
19 public protocol::VideoStub { | |
19 public: | 20 public: |
20 MouseClampingFilter(VideoFrameCapturer* capturer, | 21 MouseClampingFilter(protocol::InputStub* input_stub, |
21 protocol::InputStub* input_stub); | 22 protocol::VideoStub* video_stub); |
22 virtual ~MouseClampingFilter(); | 23 virtual ~MouseClampingFilter(); |
23 | 24 |
24 // InputStub overrides. | 25 // protocol::VideoStub implementation. |
25 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; | 26 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, |
27 const base::Closure& done) OVERRIDE; | |
26 | 28 |
27 private: | 29 private: |
28 VideoFrameCapturer* capturer_; | 30 protocol::VideoStub* video_stub_; |
29 | 31 |
30 DISALLOW_COPY_AND_ASSIGN(MouseClampingFilter); | 32 DISALLOW_COPY_AND_ASSIGN(MouseClampingFilter); |
31 }; | 33 }; |
32 | 34 |
33 } // namespace remoting | 35 } // namespace remoting |
34 | 36 |
35 #endif // REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ | 37 #endif // REMOTING_HOST_MOUSE_CLAMPING_FILTER_H_ |
OLD | NEW |