Mandoline: Disable slimming paint
[chromium-blink-merge.git] / remoting / protocol / mouse_input_filter.h
blob334474a24a0e4da939c31344d30acf801c4ec655
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_
6 #define REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_
8 #include "base/compiler_specific.h"
9 #include "remoting/protocol/input_filter.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 namespace remoting {
13 namespace protocol {
15 // Filtering InputStub implementation which scales mouse events based on the
16 // supplied input and output dimensions, and clamps their coordinates to the
17 // output dimensions, before passing events on to |input_stub|.
18 class MouseInputFilter : public InputFilter {
19 public:
20 MouseInputFilter();
21 explicit MouseInputFilter(InputStub* input_stub);
22 ~MouseInputFilter() override;
24 // Specify the input dimensions for mouse events.
25 void set_input_size(const webrtc::DesktopSize& size);
27 // Specify the output dimensions.
28 void set_output_size(const webrtc::DesktopSize& size);
30 // InputStub overrides.
31 void InjectMouseEvent(const protocol::MouseEvent& event) override;
33 private:
34 webrtc::DesktopSize input_max_;
35 webrtc::DesktopSize output_max_;
37 DISALLOW_COPY_AND_ASSIGN(MouseInputFilter);
40 } // namespace protocol
41 } // namespace remoting
43 #endif // REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_