OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_ | |
6 #define REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "remoting/protocol/input_stub.h" | |
11 #include "third_party/skia/include/core/SkSize.h" | |
12 | |
13 namespace remoting { | |
14 | |
15 class MouseInputFilter : public protocol::InputStub { | |
Sergey Ulanov
2011/12/20 00:05:35
Add comments that explain what this class does
Jamie
2011/12/20 00:51:57
...And "Filters mouse input" is not sufficient :)
Wez
2011/12/20 07:14:14
Done.
| |
16 public: | |
17 MouseInputFilter(protocol::InputStub* input_stub); | |
18 virtual ~MouseInputFilter(); | |
19 | |
20 // InputStub interface. | |
21 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; | |
22 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; | |
23 | |
24 // Specify the input dimensions for mouse events. | |
25 void SetInputDimensions(const SkISize& size); | |
Sergey Ulanov
2011/12/20 00:05:35
Maybe set_input_size()?
Wez
2011/12/20 07:14:14
Done.
| |
26 | |
27 // Specify the output dimensions. Mouse events will be scaled to these | |
28 // dimensions, and clamped to them if the mouse moves outside the input area. | |
29 void SetOutputDimensions(const SkISize& size); | |
Sergey Ulanov
2011/12/20 00:05:35
set_output_size()?
Wez
2011/12/20 07:14:14
Done.
| |
30 | |
31 protected: | |
Sergey Ulanov
2011/12/20 00:05:35
private?
Wez
2011/12/20 07:14:14
Done.
| |
32 protocol::InputStub* input_stub_; | |
33 | |
34 SkISize input_size_; | |
35 SkISize output_size_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(MouseInputFilter); | |
38 }; | |
39 | |
40 } // namespace remoting | |
41 | |
42 #endif // REMOTING_CLIENT_MOUSE_INPUT_FILTER_H_ | |
OLD | NEW |